Repository navigation
fix: prevent MiniMax-M2.7 recipe OOM - #4759
Merged
Merged
Conversation
Signed-off-by: larkzhang-nv <[email protected]>
Contributor
Author
|
/ok to test 063353b |
Contributor
Author
|
/ok to test 063353b |
joyang-nv
added a commit
that referenced
this pull request
Oct 20, 2026
…ment) With torch AdamW the 8-node MiniMax-M2.7 recipe (EP=64, 3.57B params per rank) keeps fp32 params, grads and both Adam moments: 53.7-54.2 GiB of resident training state per GPU. #4759 made it fit with CP=8 and AdamW(foreach=False); it completes, but peaks at 65.1 GiB allocated / 68.2 GiB reserved and logs expandable-segment mapping failures (near-OOM, recovered) on the way. Switch to TE FusedAdam with fp32 master weights stored as bf16 params plus 16-bit remainders, a bf16 first moment and an fp32 second moment. The second moment stays fp32 because at beta2=0.999 a bf16 exp_avg_sq cannot decay (per-step decay 0.1% < half a bf16 ulp). CP=8 and the 512-token alignment from #4759 are kept. Measured on the release recipe (main 8338530, 8x8 H100, 10 steps, same container, one run per arm): resident state 40.4-40.8 GiB (-13.3), peak allocated 54.2 GiB (-10.9; set by optimizer.step's fp32 copy of exp_avg), peak reserved 62.1 GiB (-6.0), no mapping failures, mean step time -4.3% (steps 2-4 and 6-9). All arms pass the gen_kl < 0.01 gate. Signed-off-by: Jonas Yang <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Problem
The 8-node MiniMax-M2.7 recipe can exhaust H100 memory during AdamW's foreach update. With CP=8, rounding the full sequence to 64 tokens also does not guarantee the per-rank 64-token alignment required by HybridEP, causing its combine kernel to fail JIT compilation.
Changes
Only
examples/configs/recipes/llm/grpo-minimax-m27-dapo-8n8g-automodel-ep64.yamlis changed.Validation
20333911completed 23 training steps on 8 nodes / 64 H100 GPUs with these parallelism, alignment, and optimizer settings, using the nightly container and a local MiniMax-M2.7 checkpoint. The launcher exited 0 after the configured checkpoint deadline. W&B run.tests/check_metrics.pypassed the existing 10-step gate: meantrain/gen_kl_errorover steps 1-10 was0.009333862400490034 < 0.01. The test script and its threshold are unchanged. The original run did not execute the test harness or produce TensorBoard logs.minimize-checkchecks, resolved-config assertions, CP-local alignment checks for sequence lengths 1-10240, andgit diff --checkpassed.