Skip to content

compat megatron 0.20 release and latest dev branch - #252

Merged
hjh0119 merged 2 commits into
modelscope:mainfrom
hjh0119:bump-020
Nov 3, 2026
Merged

hjh0119 merged 2 commits into
modelscope:mainfrom
hjh0119:bump-020

Conversation

@hjh0119

@hjh0119 hjh0119 commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@hjh0119
hjh0119 merged commit 9df4e2b into modelscope:main Nov 3, 2026
1 check passed
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).
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.

2 participants