Repository navigation
Enable FSDP2 + expert parallelism via a 2-D (fsdp, tp) device mesh #48516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+252
−74
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
8af1a00
Fix NaN gradients in expert-parallel training: mask uninitialized gro…
qgallouedec 1f0b7bf
Fix wrong gradients for all non-expert parameters in expert-parallel …
qgallouedec 4636d42
Trim comments
qgallouedec 89fa55c
Gate the router-score backward all-reduce on grad mode; drop the post…
qgallouedec 96769d9
Fix expert parallelism through Trainer (#48208)
qgallouedec c74c122
Enable FSDP2 + expert parallelism via a 2-D (fsdp, tp) device mesh
qgallouedec 1c66acb
Gather the sharded state dict through the model's own save helpers
qgallouedec 38aefbf
Document combining expert parallelism with FSDP2
qgallouedec e72b117
Address review: drop the dead expert-gradient sync, torch-native mixe…
qgallouedec 449acd2
Give each device mesh its own optimizer param group instead of steppi…
qgallouedec 9d17bd7
Test the 2-D mesh with a batch split across the fsdp ranks and compar…
qgallouedec 6f2d9c4
Refresh the throughput table
qgallouedec 3a8da11
Cosmetic: docstring layout, comment placement, doc link
qgallouedec 0e21b59
Merge remote-tracking branch 'upstream/main' into fsdp2-ep-2d-mesh
qgallouedec 35ed430
Merge branch 'main' into fsdp2-ep-2d-mesh
qgallouedec 75fff71
Update docs/source/en/expert_parallelism.md
qgallouedec acba6bc
Update docs/source/en/expert_parallelism.md
qgallouedec 69668c3
Update docs/source/en/expert_parallelism.md
qgallouedec 9cfb2d3
Update docs/source/en/expert_parallelism.md
qgallouedec 2884e2f
Merge branch 'main' into fsdp2-ep-2d-mesh
qgallouedec 1be3a7f
Merge branch 'main' into fsdp2-ep-2d-mesh
qgallouedec a6f5824
Merge branch 'main' into fsdp2-ep-2d-mesh
qgallouedec cb02b27
Merge branch 'main' into fsdp2-ep-2d-mesh
qgallouedec 79988c3
Merge remote-tracking branch 'upstream/main' into fsdp2-ep-2d-mesh
qgallouedec 5120748
Drop the comment on the parallel sizes
qgallouedec 0147840
Trim the parallelism config comment
qgallouedec File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.