Skip to content

fix: support multi-head MTP weight mapping in MimoBridge (closes #2131)#2154

Open
botbikamordehai2-sketch wants to merge 1 commit into
THUDM:mainfrom
botbikamordehai2-sketch:fix/issue-2131-1782820401
Open

fix: support multi-head MTP weight mapping in MimoBridge (closes #2131)#2154
botbikamordehai2-sketch wants to merge 1 commit into
THUDM:mainfrom
botbikamordehai2-sketch:fix/issue-2131-1782820401

Conversation

@botbikamordehai2-sketch

Copy link
Copy Markdown

What

The _convert_mtp_param method in MimoBridge assumes a single MTP layer and has incomplete handling for the transformer_layer sub-components. When --mtp-num-layers > 1, the weight conversion for layers within each MTP block fails because proxy decoder layer indices conflict and the final replacement is missing. This causes crashes during training initialization.

Fix

  • Removed the outdated comment about single MTP layer support.
  • Added proper conversion of transformer layer names back to model.mtp_layers.{idx} after using the parent class mapping, ensuring all MTP layer indices are correctly mapped regardless of the number of MTP heads.
  • Added a fallback NotImplementedError for unsupported MTP parameters.

Closes #2131

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Multi-head MTP (--mtp-num-layers > 1) crashes at training-step logging

1 participant