Skip to content

fix: plumb fp8_recipe into OptimizerConfig for fp8_param runs - #3281

Merged
terrykong merged 5 commits into
NVIDIA-NeMo:mainfrom
seonjinn:fix/fp8-param-optimizer-fp8-recipe
Aug 29, 2026
Merged

terrykong merged 5 commits into
NVIDIA-NeMo:mainfrom
seonjinn:fix/fp8-param-optimizer-fp8-recipe

Conversation

@seonjinn

@seonjinn seonjinn commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fix MXFP8 fp8_param training by forwarding fp8_cfg.fp8_recipe to Megatron's OptimizerConfig.

Changes

  • Pass the FP8 recipe to the optimizer when FP8 is enabled.
  • Add unit tests for enabled, disabled, and absent FP8 settings.

This prevents the first training step from reading uninitialized master-parameter shards. The separate step-2 buffer lifecycle issue is out of scope.

@seonjinn
seonjinn requested a review from a team as a code owner July 18, 2026 23:44
@copy-pr-bot

copy-pr-bot Bot commented Jul 18, 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.

@seonjinn

Copy link
Copy Markdown
Contributor Author

/ok to test 89bb03c

@seonjinn
seonjinn force-pushed the fix/fp8-param-optimizer-fp8-recipe branch from 89bb03c to 92a8a1b Compare July 20, 2026 19:39
@seonjinn
seonjinn requested a review from a team as a code owner August 18, 2026 05:14
@seonjinn seonjinn added the CI:L1 Run doctests, unit tests, and functional tests label Aug 18, 2026
@seonjinn

Copy link
Copy Markdown
Contributor Author

Contributor self-review refresh for bef4fa1798ba39b408ecc096709fe9bdd876ea80 after the latest main merge.

An independent audit found no actionable issues. The enabled FP8 recipe is forwarded consistently with pinned Bridge/MCore optimizer semantics, while absent/disabled configurations preserve the default. A focused regression now covers enabled MXFP8 plus absent/disabled cases. Ruff/format/config checks pass locally; Linux Megatron coverage remains delegated to CI.

@seonjinn

Copy link
Copy Markdown
Contributor Author

/ok to test e626e34

…20260828

Signed-off-by: seonjinn <[email protected]>

# Conflicts:
#	tests/unit/models/megatron/test_megatron_setup.py
@terrykong
terrykong enabled auto-merge (squash) August 29, 2026 05:24
@seonjinn seonjinn added CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version) and removed CI:L1 Run doctests, unit tests, and functional tests labels Aug 29, 2026
@seonjinn

Copy link
Copy Markdown
Contributor Author

/ok to test 518a622

@terrykong
terrykong merged commit 46dfb92 into NVIDIA-NeMo:main Aug 29, 2026
86 checks passed
cspades pushed a commit to cspades/RL that referenced this pull request Aug 30, 2026
asolergi-nv added a commit that referenced this pull request Aug 30, 2026
Three commits, no conflicts:

  ccbcd4c fix(async): preserve rollout lookahead on resume (#3435)
  f56c8cf feat(megatron): support te precision config recipes (#3654)
  46dfb92 fix: plumb fp8_recipe into OptimizerConfig for fp8_param runs (#3281)

None touch the refit, membership or supervisor paths this PR changes. Submodule pointers
(Megatron-Bridge, Automodel, Gym) and uv.lock/pyproject are byte-identical to main.

Signed-off-by: asolergibert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants