Repository navigation
compat megatron 0.20 release and latest dev branch - #252
Merged
Merged
Conversation
tastelikefeet
approved these changes
Nov 3, 2026
tastelikefeet
added a commit
that referenced
this pull request
Nov 4, 2026
Conflict resolution (MTP diverged between the branches): main's #252 delegates the MTP loss loop to mcore's process_mtp_loss (mtp.py) and reinterprets mtp_shared_weights as an alias for mtp_use_repeated_layer -- but that path has no mtp_freeze, enable_mtp_training or mtp_labels, which ms-swift v5 depends on for RL MTP training (its RL trainer passes labels=None and _fix_mtp/ validate read the two flags). So the merge keeps the v5 loss loop in gpt_model.py and the v5 unroll semantics of mtp_shared_weights, while taking from main: mtp_allow_random_init, the stricter positive- mtp_num_layers assert, the ebk/mhc_multistream/padding_mask MTP-block call signature, and everything the auto-merge already accepted (mcore 0.20 compat, requirements >=0.18,<0.21). Dropped as dead code alongside the delegate call: the prepare_mtp_loss_mask/process_mtp_loss import and _MtpOutputLayerProxy. mtp.py itself stays (other entry points import from it).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.