Skip to content

fix(vlm): use FP32 master weights for Nemotron Omni - #3444

Merged
HuiyingLi merged 3 commits into
NVIDIA-NeMo:mainfrom
HuiyingLi:huiyingl/fix/nemotron-omni-fp32-master
Aug 15, 2026
Merged

fix(vlm): use FP32 master weights for Nemotron Omni #3444
HuiyingLi merged 3 commits into
NVIDIA-NeMo:mainfrom
HuiyingLi:huiyingl/fix/nemotron-omni-fp32-master

Conversation

@HuiyingLi

@HuiyingLi HuiyingLi commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

What changed

  • switch the Nemotron Omni CORD-v2 recipe from native BF16 AdamW updates to Transformer Engine FusedAdam with FP32 master weights at 6.0e-6
  • enable activation checkpointing for the validated single-node 8-GPU configuration
  • add a config-contract test pinning the optimizer target, learning rate, master-weight settings, and activation checkpointing

Why

At 6.0e-6, directly updating BF16-resident parameters causes many optimizer steps to round back to the same BF16 value. Megatron Bridge avoids this by accumulating updates in FP32 main parameters. Using FusedAdam FP32 master weights gives AutoModel the same update precision while retaining BF16 model storage.

Impact

The shipped Nemotron Omni CORD-v2 recipe can train at 6.0e-6 on one node with 8 H100 GPUs. The change is scoped to that single recipe plus its test — no framework code and no other recipe is touched.

Validation

  • pytest tests/unit_tests/recipes/test_nemotron_omni_cord_recipe.py — 1 passed

  • 20-step single-node 8xH100 run with FSDP2, EP8, activation checkpointing, and FP32 master weights: loss 0.7625 -> 0.0811, peak memory approximately 59.6 GiB/GPU

  • re-run on the current head (3ea2b46), 20 steps + validation on one node with 8xH100, clean exit — wandb: https://wandb.ai/Nemo-automodel/omni-fp32-master/runs/hvhxolfv

    step  0 | loss 0.6316 | grad_norm  7.8671 | lr 6.00e-06 | mem 59.50 GiB
    step 19 | loss 0.0533 | grad_norm  1.6124 | lr 6.00e-06 | mem 67.12 GiB
    [val] step 19 | loss 0.0547 | num_label_tokens 19461
    

    Validation loss tracks training loss. Three signals confirm the new optimizer path is the one actually running: the Detected torch.optim.Adam/AdamW with trainable bf16 model parameters warning that main emits every run is absent; lr logs as 6.00e-06 rather than main's 1e-4; and Transformer Engine accepts both master_weights and master_weight_dtype.

@copy-pr-bot

copy-pr-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@HuiyingLi

Copy link
Copy Markdown
Contributor Author

/ok to test 48328c1

@HuiyingLi

Copy link
Copy Markdown
Contributor Author

/claude review

@HuiyingLi HuiyingLi changed the title fix(vlm): use FP32 master weights for Nemotron Omni fix(vlm): use FP32 master weights for Nemotron Omni and other fixes Aug 6, 2026
@HuiyingLi
HuiyingLi marked this pull request as ready for review August 14, 2026 21:29
@HuiyingLi
HuiyingLi requested a review from a team as a code owner August 14, 2026 21:29
@HuiyingLi HuiyingLi changed the title fix(vlm): use FP32 master weights for Nemotron Omni and other fixes fix(vlm): use FP32 master weights for Nemotron Omni Aug 14, 2026
@HuiyingLi

Copy link
Copy Markdown
Contributor Author

/claude review

@HuiyingLi

Copy link
Copy Markdown
Contributor Author

/ok to test afa8737

@claude

claude Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

LGTM

HuiyingLi and others added 3 commits August 14, 2026 15:18
Signed-off-by: HuiyingLi <willwin.lee@gmail.com>
Signed-off-by: HuiyingLi <willwin.lee@gmail.com>
Remove the projector-freezing feature and the freeze_embeddings config
change, keeping only the FP32 master-weights optimizer and activation
checkpointing changes.

- restore freeze_config to the original tower-wide freezing (freeze_embeddings
  reinstated, freeze_vision_projector/freeze_audio_projector removed)
- revert apply_parameter_freezing to its main-branch behavior
- drop the projector-freezing unit tests and freeze_config recipe assertions

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: HuiyingLi <willwin.lee@gmail.com>
@HuiyingLi
HuiyingLi force-pushed the huiyingl/fix/nemotron-omni-fp32-master branch from 37cf6d0 to 3ea2b46 Compare August 14, 2026 22:18
@HuiyingLi
HuiyingLi enabled auto-merge (squash) August 15, 2026 00:47
@HuiyingLi

Copy link
Copy Markdown
Contributor Author

/ok to test 3ea2b46

@HuiyingLi
HuiyingLi merged commit 5001dd4 into NVIDIA-NeMo:main Aug 15, 2026
88 checks passed
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