Skip to content

fix(optimizer): checkpoint native FP32 parameters in mixed precision - #5930

Closed
FDecaYed wants to merge 1 commit into
NVIDIA:mainfrom
FDecaYed:codex/native-fp32-optimizer-state
Closed

fix(optimizer): checkpoint native FP32 parameters in mixed precision#5930
FDecaYed wants to merge 1 commit into
NVIDIA:mainfrom
FDecaYed:codex/native-fp32-optimizer-state

Conversation

@FDecaYed

Copy link
Copy Markdown
Contributor

What

Fix sharded optimizer-state mapping when mixed-precision parameter groups interleave BF16/FP16 parameters with parameters that remain natively FP32. State ids now follow the inner optimizer order, while FP32 master copies are paired only with converted low-precision parameters.

This is a generic checkpointing correctness fix and is detached from the DSv4 stack. It does not depend on the parameter-marking PR; DSv4 call sites can consume both independently.

Provenance

Testing

  • uv run isort --check-only on both changed Python files
  • uv run ruff check on both changed Python files
  • uv run python -m compileall -q on both changed Python files
  • Focused CUDA checkpoint test is included; local execution requires the project CUDA/Torch environment and is left to CI.

Keep optimizer-state ids aligned with model parameters when BF16/FP16 parameters are interleaved with parameters that remain natively FP32.

Signed-off-by: Deyu Fu <Deyu.Foo@gmail.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown

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.

@FDecaYed

Copy link
Copy Markdown
Contributor Author

/ok to test 851d75d

Copy link
Copy Markdown
Contributor Author

Closing this standalone boundary because it is absorbed into P1. P1 combines selective-FP32 runtime and native-FP32 optimizer checkpoint correctness and will be published by updating #5929. Tracking PR: #5795.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant