perf(recipe): tune Nemotron Omni H100 fine-tuning - #5524
Open
cuichenx wants to merge 15 commits into
Open
Conversation
Signed-off-by: Chen Cui <chcui@nvidia.com>
Signed-off-by: Chen Cui <chcui@nvidia.com>
Signed-off-by: Chen Cui <chcui@nvidia.com>
Signed-off-by: Chen Cui <chcui@nvidia.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Contributor
Author
|
/ok to test d6fb26b |
Signed-off-by: Chen Cui <chcui@nvidia.com>
Contributor
Author
|
/ok to test cd0a475 |
Signed-off-by: Chen Cui <chcui@nvidia.com>
Signed-off-by: Chen Cui <chcui@nvidia.com>
Signed-off-by: Chen Cui <chcui@nvidia.com>
Signed-off-by: Chen Cui <chcui@nvidia.com>
Contributor
Author
|
/ok to test 93ccec7 |
Signed-off-by: Chen Cui <chcui@nvidia.com>
yaoyu-33
approved these changes
Aug 14, 2026
Contributor
|
/ok to test d7da085 |
Contributor
|
/ok to test 1cf8d6d |
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 ?
Adds validated one-node H100 fine-tuning variants for Nemotron 3 Nano Omni, including lower-precision optimizer state, HybridEP for 4K CORD-v2 SFT/PEFT, and packed CP2 all-to-all execution for 8K SFT. It also adds an explicit, default-off option that makes Transformer Engine precision-aware optimizer checkpoints saveable and reloadable under tight GPU-memory margins without changing their portable values or dtypes.
The promoted 4K full-SFT recipe now uses MBS4, fused attention, Transformer Engine cross entropy, fused weighted squared-ReLU, router fusion, and selective MoE/layernorm recompute. These are execution changes only: the real image-text data, objective, GBS64, trained parameters, and natural routing semantics are preserved.
Changelog
stage_precision_aware_optimizer_state_on_cpucheckpoint option. Enable it only in the two full-SFT H100 recipes whose complete optimizer checkpoints otherwise exhaust device memory; reject non-torch_distuse and leave PEFT and portable recipes disabled.Validation
All promoted runs used the public
nvcr.io/nvidia/nemo:26.06container, immutable model and CORD-v2 revisions, eight H100 GPUs, and real image-text samples.The optimized 4K full-SFT run used exact clean Bridge commit
9b69b47a321de14b0453c230dd130e18ae0f00f7and pinned Megatron-Core commit24bad8e677d22625d86ef2a54c9506b6e4992c93. Runtime validation confirmed both dense and expert Transformer Engine FusedAdam instances as scaled FP16 main parameters, BF16 main gradients/moments, and no parameter remainders on every rank.The optimized 4K run improves final-ten model throughput by 77.3% over the prior exact 111.15 TFLOP/s/GPU evidence. It recorded zero skipped/NaN iterations and saved complete model, optimizer, scheduler, RNG, and train-state checkpoints at steps 50 and 100. A separate direct continuation loaded the step-50 distributed optimizer and train state, completed steps 51–100 with zero skipped/NaN iterations, and reproduced final-ten performance at 3,604.14 ms / 197.07 TFLOP/s/GPU. Across the 50 aligned resumed steps, mean absolute LM-loss drift was 0.00050938 and maximum absolute drift was 0.00155107 under natural HybridEP routing.
The final opt-in implementation was rechecked at exact clean Bridge commit
e88515d35c4efb4c4bd1a4d9a0ae3c4f865f0c9d: the enabled 4K full-SFT recipe saved a complete distributed step-51 optimizer/RNG checkpoint (about 445.8 GB), and a fresh process loaded that checkpoint and completed step 52 with finite loss/gradient and zero skipped/NaN iterations. This follow-up changes only whether CPU staging is selected; it does not change training arithmetic or the 100-step performance configuration above.Controlled full-SFT screens rejected alternatives that were slower, memory-heavier, unsupported for this architecture, or incompatible with the reduced-precision optimizer contract. In particular, fused residual RMSNorm was noise-level faster but consumed about 4 GiB more sampled peak memory; fused QKV+RoPE does not support the real multimodal forward shape; grouped shared-expert GEMM requires SwiGLU rather than this model's squared-ReLU; and capturable optimizer graphing requires FP32 master weights.
Additional checks:
uv run pre-commit run --all-filespassed.git diff --checkpassed.GitHub Actions CI
This is a draft PR. Final CI can be triggered against the published head commit.
Before your PR is "Ready for review"
Pre checks:
Additional Information
No linked issue.