Skip to content

fix(checkpoint): support bf16 stage 0 conversion - #8681

Open
rohan-patnaik wants to merge 1 commit into
deepspeedai:masterfrom
rohan-patnaik:fix/bf16-stage0-zero-to-fp32
Open

rohan-patnaik wants to merge 1 commit into
deepspeedai:masterfrom
rohan-patnaik:fix/bf16-stage0-zero-to-fp32

Conversation

@rohan-patnaik

Copy link
Copy Markdown

Fixes #6699.

Recognize the existing BF16 stage-0 optimizer layout and reuse the ZeRO-1 FP32 reconstruction path. Explicit ZeRO stages still take precedence, and unrelated checkpoint layouts retain the existing error.

Verification:

  • Added a two-shard CPU regression with exact FP32 recovery.
  • python -m pytest -q tests/unit/checkpoint/test_convert_checkpoint.py (5 passed, 1 skipped)
  • pre-commit run --files deepspeed/utils/zero_to_fp32.py tests/unit/checkpoint/test_convert_checkpoint.py

Signed-off-by: Rohan Patnaik <rohan-patnaik@users.noreply.github.com>

This branch has not been deployed

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

Labels

skip-gpu-test Requires positive evidence that every changed behavior can be validated without a GPU.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How could I convert ZeRO-0 deepspeed weights into fp32 model checkpoint?

1 participant