Repository navigation
Conversation
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
|
Automatic Claude reviews have been retired. To request a pull-request review, post a comment containing: Add |
Contributor
cuichenx
marked this pull request as draft
October 12, 2026 20:39
This branch was successfully deployed
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?
Prevent FSDP DTensor checkpoint collisions between pipeline stages by applying Megatron-Core's global-layer naming handler on both save and load. Without it, stages can write different model weights and Adam moments under identical stage-local keys; a successful load can then silently resume from incorrect state. This affects dense GPT as well as hybrid Nemotron models.
Depends on NVIDIA/Megatron-LM#8159, which contains the shared checkpoint handler, FSDP v1 PP mesh fix, and shared-embedding gradient reduction fixes. That Core PR depends on NVIDIA/Megatron-LM#8010 for meta-device embedding initialization. Keep this draft until that dependency is available.
Changelog
PP=1 checkpoint keys remain unchanged. Checkpoints already affected by stage-local collisions have omitted stage-specific tensors and need to be regenerated; this change cannot reconstruct them.
Validation
5920bd95) plus Core #8159: checkpoint weights and Adam state restore exactly, next loss/gradient norm match exactly, and all 287 post-step model/Adam tensors match numerically (maximum absolute difference 4.331e-8).Training probes use function-level patch injection into NeMo 26.08.01 and include #8010 plus the existing upstream embedding-gradient reduction fix from NVIDIA/Megatron-LM#6486.
The training probes set
model.deallocate_pipeline_outputs=False, required for the output views returned by FSDP v1 hooks. Short synthetic-data runs establish correctness for the tested configurations, not convergence or performance.Independent subagent review completed before publication; no blocking findings.
Before this PR is ready for review