Add Expert parallel #48792

3outeille wants to merge 92 commits into main from ep-mesh
3outeille
qgallouedec Fix NaN gradients in expert-parallel training: mask uninitialized gro…
8af1a002
qgallouedec Fix wrong gradients for all non-expert parameters in expert-parallel …
1f0b7bf6
qgallouedec Trim comments
4636d425
qgallouedec Gate the router-score backward all-reduce on grad mode; drop the post…
89fa55ca
qgallouedec Fix expert parallelism through Trainer (#48208)
96769d99
qgallouedec Enable FSDP2 + expert parallelism via a 2-D (fsdp, tp) device mesh
c74c1228
qgallouedec Gather the sharded state dict through the model's own save helpers
1c66acbc
qgallouedec Document combining expert parallelism with FSDP2
38aefbf2
qgallouedec Address review: drop the dead expert-gradient sync, torch-native mixe…
e72b117d
qgallouedec Give each device mesh its own optimizer param group instead of steppi…
449acd21
qgallouedec Test the 2-D mesh with a batch split across the fsdp ranks and compar…
9d17bd7a
qgallouedec Refresh the throughput table
6f2d9c4b
qgallouedec Cosmetic: docstring layout, comment placement, doc link
3a8da119
qgallouedec Expert-parallel token dispatch: each rank trains on its own part of t…
1b071993
qgallouedec Make the dispatch handling of the experts explicit in apply_fully_sha…
7063c456
qgallouedec Combine the dispatched expert outputs in the routing weights' precisi…
dc1fdeee
qgallouedec Split the batches across every rank with a DistributedSampler under t…
f2a3c26d
qgallouedec Simplify the dispatch: torch's differentiable all-to-all, the grouped…
3ab94ff1
qgallouedec Dispatch as plan-level styles; one notion of the ranks sharing a batc…
d1881444
qgallouedec Select the dispatch styles in the mixin, guard the torch version and …
b9bf58bd
qgallouedec Rewrite the expert parallel plan the model actually reads for the dis…
39cdce50
qgallouedec Seed the dispatch sampler with data_seed; require the grouped_mm expe…
9f862308
qgallouedec Run the local experts directly: the grouped forward's masking and com…
930c146a
qgallouedec Run the local experts through the module's own forward
15588e00
qgallouedec Dispatch: one host sync per layer, comments say what the code does
51f281d9
qgallouedec Dispatch: drop the router style, reuse the named mesh and is_dtensor,…
101bfea9
qgallouedec Dispatch: skip the mixin tests for models without an FSDP plan, drop …
2d9046bd
qgallouedec Fix the _has_fsdp_plan docstring
42606afb
qgallouedec Drop the FSDP plan skip from the mixin tests: every config carries a …
d8eb1fc1
qgallouedec Format
23920e3a
qgallouedec Keep the base install_forward signature on the dispatch experts style
e1498696
qgallouedec Docs: shorter token dispatch overview
e139e8a5
qgallouedec Replicate the rest of the plan under expert parallel token dispatch
cf74929d
qgallouedec Merge remote-tracking branch 'upstream/main' into fsdp2-ep-2d-mesh
0e21b598
qgallouedec Merge branch 'fsdp2-ep-2d-mesh' into ep-token-dispatch
18144abb
qgallouedec Update docs/source/en/expert_parallelism.md
c9a42167
qgallouedec Update docs/source/en/expert_parallelism.md
8f2f9cb1
qgallouedec Update docs/source/en/expert_parallelism.md
3c8f600e
qgallouedec Update docs/source/en/expert_parallelism.md
e7be30a9
qgallouedec Update docs/source/en/expert_parallelism.md
8dbccad4
qgallouedec Merge branch 'main' into fsdp2-ep-2d-mesh
35ed430b
qgallouedec Merge branch 'fsdp2-ep-2d-mesh' into ep-token-dispatch
79fe11d4
qgallouedec Keep replicated_with_grad_allreduce under expert-parallel dispatch
0817429f
qgallouedec Compare gradients, not only the loss, in the EP backward test
34e63c9d
qgallouedec Update docs/source/en/expert_parallelism.md
75fff716
qgallouedec Update docs/source/en/expert_parallelism.md
acba6bc9
qgallouedec Update docs/source/en/expert_parallelism.md
69668c3c
qgallouedec Update docs/source/en/expert_parallelism.md
9cfb2d3b
qgallouedec Merge branch 'main' into fsdp2-ep-2d-mesh
2884e2f1
qgallouedec Merge branch 'fsdp2-ep-2d-mesh' into ep-token-dispatch
4ce47004
qgallouedec Declare dispatch_experts_forward next to its only caller
28cb4827
qgallouedec Name the dispatch strategy instead of switching it with a bool
a6e36c09
qgallouedec Merge branch 'main' into fsdp2-ep-2d-mesh
1be3a7f5
qgallouedec Merge remote-tracking branch 'upstream/fsdp2-ep-2d-mesh' into ep-toke…
db788602
qgallouedec Merge branch 'main' into fsdp2-ep-2d-mesh
a6f5824a
qgallouedec Merge branch 'fsdp2-ep-2d-mesh' into ep-token-dispatch
b56e1d68
qgallouedec Merge branch 'main' into fsdp2-ep-2d-mesh
cb02b27f
qgallouedec Pass the ignored params through the policy helper
6a86e181
qgallouedec Merge remote-tracking branch 'upstream/main' into fsdp2-ep-2d-mesh
79988c35
qgallouedec Drop the comment on the parallel sizes
51207488
qgallouedec Trim the parallelism config comment
0147840f
qgallouedec Merge remote-tracking branch 'upstream/fsdp2-ep-2d-mesh' into ep-toke…
d604a2a2
qgallouedec Merge remote-tracking branch 'upstream/main' into ep-token-dispatch
b169a75d
qgallouedec Address review: guard dispatch + PP, derive the mesh name, move the g…
3439765f
qgallouedec Keep reading the tensor parallel size from accelerate in `get_tp_size`
4f2a6b91
qgallouedec Give the token dispatch weight comparison its own tolerance
86561b69
3outeille Separate expert dispatch mesh from tensor parallel size
df8fa771
3outeille Support trunk tensor parallelism with folded expert dispatch
60655f89
3outeille rm config test
d7753400
3outeille Simplify expert dispatch and rename edp to efsdp
a49aa6d1
3outeille Merge branch 'ep-token-dispatch' into ep-mesh
b1fdbdf3
3outeille Merge origin/ep-mesh and restore expert-parallel mesh support
6d8f54de
HuggingFaceDocBuilderDev
3outeille Unify dense and expert mesh construction
ea65cfb3
3outeille remove
b33e45e0
3outeille Encapsulate distributed mesh views behind named accessors
0eb9ffa8
3outeille Simplify MeshManager access and keep mesh views private
4d63a32c
3outeille Simplify expert parallel configuration and explicit plan selection
d4da6e0b
3outeille Resolve TP and EP plans before sharding and derive expert dispatch
6a1059ee
3outeille Merge branch 'main' into ep-token-dispatch
56047f4c
3outeille Merge branch 'ep-token-dispatch' into ep-mesh
00717373
3outeille Inline legacy expert parallel compatibility handling
c8a05bc6
3outeille Simplify parallel plan resolution and clarify TP and EP meshes
cc2237c5
3outeille remove
fc37645e
3outeille Remove auto EP plans and clarify parallel plan tests
251b2b94
3outeille Clarify expert parallel docs and explicit sharding mesh selection
8c2588da
3outeille Always wrap dispatched experts on the expert FSDP mesh
19118585
3outeille Clarify TP and EP layouts in FSDP comparison test
49f432cd
3outeille Clarify all-reduce and dispatch layouts in EP tests
6d231256
3outeille Take TP and EP meshes in apply_tensor_parallelism
e1d33d25
ArthurZucker
ArthurZucker commented on 2026-09-15
qgallouedec
3outeille 3outeille changed the base branch from ep-token-dispatch to main 5 days ago
3outeille
3outeille commented on 2026-09-15
stevhliu
stevhliu commented on 2026-09-15
qgallouedec
3outeille
3outeille commented on 2026-09-15
3outeille 3outeille force pushed from e946c604 to e1d33d25 5 days ago
qgallouedec
3outeille
3outeille add default all-to-all plan for qwen3_moe only + derive rule from pl…
79fe4a43
github-actions
3outeille raise in `resolve_parallel_plans` when an override key matches no mod…
2dc99524
3outeille better distinguish masked/all-to-all path for nicer API
b2b0d324
github-actions
qgallouedec
3outeille 3outeille changed the title Ep mesh Add Expert parallel 4 days ago
3outeille 3outeille changed the base branch from main to ep-mesh-infrastructure 4 days ago
3outeille 3outeille force-pushed the ep-mesh-infrastructure branch from 60cba1b1 to 6ac0a63d 4 days ago
3outeille 3outeille changed the base branch from ep-mesh-infrastructure to ep-plans 4 days ago
3outeille 3outeille force-pushed the ep-plans branch from 2380fa70 to 1d65182a 4 days ago
3outeille 3outeille force-pushed the ep-plans branch from 1d65182a to bd13eea7 4 days ago
3outeille 3outeille force-pushed the ep-plans branch from bd13eea7 to db95b9f5 4 days ago
3outeille 3outeille marked this pull request as ready for review 4 days ago
3outeille 3outeille marked this pull request as draft 4 days ago
3outeille 3outeille force-pushed the ep-plans branch from db95b9f5 to fbb99855 4 days ago
3outeille 3outeille changed the base branch from ep-plans to main 4 days ago

Login to write a write a comment.

Login via GitHub

Assignees
No one assigned
Labels
Milestone