-
Notifications
You must be signed in to change notification settings - Fork 279
fix(minimax): repair HF parity reference and gate at the measured envelope #3674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
6efad5b
fix(test): repair legacy partial-rotary spec in vanilla-HF parity ref…
yuhezhang-ai fa7900e
test(ci): use the shared relaxed resume envelope for MiniMax M2.7 LoRA
yuhezhang-ai f084608
fix(moe): score sigmoid routing in fp32 by default
yuhezhang-ai b5e4162
fix(test): pin fp32 reference tensors across vanilla-HF layout differ…
yuhezhang-ai f60a246
fix(minimax): restore the checkpoint's fp32 router end to end
yuhezhang-ai e894ea4
fix(moe): allocate fp32-contract router gates in fp32 at construction
yuhezhang-ai cd2c0e1
test(ci): gate MiniMax M2.7 cross-framework parity at the measured en…
yuhezhang-ai a83a083
fix(minimax): extend the fp32 router contract and robustness gates to…
yuhezhang-ai f1e2bed
fix(test): resolve in-tree reference configs past AutoModel registrat…
yuhezhang-ai 5cdfa10
test(ci): fit the 427B MiniMax-M3 vanilla reference on rank 0's node
yuhezhang-ai 5f2ec3c
fix(test): apply device-map memory caps to the source-load reference
yuhezhang-ai ac5194f
test(ci): skip the intractable 427B M3-VL vanilla-HF phases
yuhezhang-ai 6fb4b3d
fix(test): restrict fp32 leaf aliases to distinctive names
yuhezhang-ai 0728023
test(ci): right-size the M3-VL robustness job time to the measured ru…
yuhezhang-ai 1376177
refactor(moe): resolve the gate score dtype once at construction
yuhezhang-ai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 would it make sense to have this if -> set default in the
__post_init__ofBackendConfig? I'm wondering if that would break anything, otherwise looks like it would us some headache.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
Noneneeds to remain theBackendConfigdefault. It means the caller did not specify a gate-compute dtype, allowing each model to install its reference-compatible policy while preserving an explicit override.Making FP32 the global default in
BackendConfig.__post_init__would change projection arithmetic for router families whose references intentionally project in BF16, including Qwen3 MoE, DeepSeek V4, GPT-OSS, Mistral 4, and Laguna. #3650 specifically found that a global FP32 router policy would be incorrect.For MiniMax, the F32 checkpoint gate and FP32 routing chain are model-owned, so I think this conditional belongs here. We could consider a follow-up helper to reduce the repeated immutable
replace(...)pattern, but it should still receive the model-specific default explicitly and preserveNoneglobally.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair point @yuhezhang-ai , perhaps i should provide more context, what i wanted to ensure is that later the code accesses
gate_precisionwithout assuming there's a case its beNone, right now i see something likeIf possible, i feel it would be easier to maintain if it used
scores.to(dtype=self.gate_precision).