Add gated GLM-5.2 bit-exact compatibility paths - #4
Draft
zrr1999 wants to merge 9 commits into
Draft
Conversation
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.
What does this PR do?
Draft。只改 Megatron-LM。三个兼容 flag 和
native_unfused_adamw默认False,关闭时走原来的 fused/native 路径。--norm-accuracy-compatible:显式 fp32 RMSNorm。DSA qk-norm 与 MTP layer-norm spec 可选用。--dsa-accuracy-compatible:关掉 fused DSA kernel;unfused 路径用显式 masked softmax backward。--router-accuracy-compatible:router gating 用 fp32torch.mm。native_unfused_adamw:torch.optim.AdamW(foreach=False, fused=False)。MTP spec 把
config传入get_mtp_layer_spec*,否则 MTP 选不到上面的 RMSNorm。测试:RMSNorm 兼容路径、DSA unfused softmax backward、router fp32 gating、MTP spec 使用传入的 config。
Issue tracking
Linked issue: 无
Contribution process
Pre-checks