Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion slime/backends/megatron_utils/megatron_to_hf/mimo.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ def convert_mimo_mtp_param(args, name, param):
"final_layernorm.weight": f"model.mtp_layers.{layer_idx}.final_layernorm.weight",
}
if component == "eh_proj.weight":
# chunk and reorder halves; create new tensor to avoid mutating input
first_half, second_half = param.chunk(2, dim=1)
param = torch.cat([second_half, first_half], dim=1)
param = torch.cat([second_half, first_half], dim=1).contiguous()

# Check direct mappings first
if component in direct_mappings:
Expand Down
Loading