Repository navigation
[MFSDP] Preserve native v2 DTensor checkpoint projections - #9374
Open
WEIXILIN0307 wants to merge 2 commits into
Open
WEIXILIN0307 wants to merge 2 commits into
WEIXILIN0307 wants to merge 2 commits into
Conversation
Apply v1 projection conversion only to v1 checkpoints. Exercise native v2 SwiGLU MoE save/load and continued training with exact parameter, Adam and step comparisons. Signed-off-by: Pinoeer-kingxi <13022943007@163.com>
This was referenced Nov 12, 2026
Keep the existing fused MLA conversion. Check the packed expert keys on disk and compare model and Adam state across save/load and one resumed step. Signed-off-by: Pinoeer-kingxi <weixilin307@gmail.com>
WEIXILIN0307
marked this pull request as ready for review
November 25, 2026 01:50
This branch has not been 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?
Saving a native FSDP v2 SwiGLU checkpoint raises
AttributeErrorwhen the shared preprocessor sends its DTensors to the v1 projection converter. The converter expectsmegatron_fsdp_slice, which native v2 DTensors lack.Skip that conversion for v2 in the shared save/load path. Native v2 saves and restores packed projection keys, and v1 keeps its split
_wand_vkeys. This fixes native v2 resume within its own layout. A future format change needs a separate restore test for existing packed checkpoints. Related format workReview guide
Start with the SwiGLU version guard. Check that the guard applies to both save and load. Expert naming, uneven-DTensor handling and fused MLA keep their existing paths. Then check the production save/load regression.
Validation
On
4a968a8, EP1 and EP2 BF16 MoE cases pass per rank on two RTX A6000s. Both check the packed expert keys on disk and restore into a separately initialized model. Parameters, Adam state, step counters and the next loss match the uninterrupted run. EP4 was skipped on two GPUs. Cross-format restore and upstream GPU CI remain pending.Issue tracking
Independent checkpoint fix used by the save/restore validation in #9112 and discussed in #9113.
Code provenance
No external code copied or adapted.
Contribution process