Repository navigation
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
3outeille
force-pushed
the
cp-9-ep-x-cp
branch
from
November 9, 2026 14:25
c9e600a to
d0d2eb7
Compare
This was referenced Nov 9, 2026
3outeille
force-pushed
the
cp-9-ep-x-cp
branch
from
November 9, 2026 14:37
d0d2eb7 to
58051e9
Compare
This was referenced Nov 9, 2026
3outeille
force-pushed
the
cp-9-ep-x-cp
branch
from
November 10, 2026 02:50
58051e9 to
62333ac
Compare
3outeille
force-pushed
the
cp-9-ep-x-cp
branch
from
November 10, 2026 03:01
62333ac to
963136f
Compare
3outeille
force-pushed
the
cp-9-ep-x-cp
branch
from
November 10, 2026 05:19
963136f to
dcd89f0
Compare
3outeille
force-pushed
the
cp-9-ep-x-cp
branch
from
November 10, 2026 05:45
dcd89f0 to
95dc69d
Compare
3outeille
force-pushed
the
cp-9-ep-x-cp
branch
from
November 10, 2026 06:03
95dc69d to
55ebcac
Compare
3outeille
force-pushed
the
cp-9-ep-x-cp
branch
from
November 16, 2026 08:03
9d6bb66 to
8e71dde
Compare
3outeille
force-pushed
the
cp-9-ep-x-cp
branch
from
November 16, 2026 08:07
8e71dde to
039778c
Compare
3outeille
force-pushed
the
cp-9-ep-x-cp
branch
from
November 16, 2026 08:20
039778c to
0eea216
Compare
3outeille
force-pushed
the
cp-9-ep-x-cp
branch
2 times, most recently
from
November 20, 2026 06:58
2162932 to
45dbfa4
Compare
distributed] Context parallelism with expert parallelismdistributed] Sequence parallelism with expert parallelism
3outeille
force-pushed
the
cp-9-ep-x-cp
branch
from
November 20, 2026 08:49
45dbfa4 to
611354a
Compare
3outeille
force-pushed
the
cp-9-ep-x-cp
branch
from
November 30, 2026 06:28
611354a to
76225c6
Compare
3outeille
force-pushed
the
cp-9-ep-x-cp
branch
from
November 30, 2026 07:08
76225c6 to
a4f9034
Compare
3outeille
force-pushed
the
cp-9-ep-x-cp
branch
2 times, most recently
from
December 2, 2026 07:13
f3a8161 to
8b3e78c
Compare
Each rank of an sp group dispatches the tokens of its own slice only, so no token reaches an expert twice and `efsdp * ep` still covers `fsdp * sp * tp`. The expert gradient divide factor already counts the sp ranks through `dp_size`, so only the explanatory comment and the mesh docstring change; `sp_size` with `ep_size` is no longer refused.
The tiny Qwen3-MoE against the same weights on the full sequences, with token dispatch on `sp2 x ep2`, `sp2 x fsdp2 x ep4`, `sp2 x fsdp2 x ep2` (efsdp), `sp2 x tp2 x ep4` and `sp2 x hsdp2 x ep2`, plus the all-reduce plan with `ep_size=tp_size=2` where the ep group holds one sp slice. Every case stays within four ranks.
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?
Stack: #50493 → #50496 → #50796 → #50511 → this PR → #50521 → #50522
Allows combining sequence parallelism with expert parallelism (
DistributedConfig(sp_size=S, ep_size=E, ...)). Onlypp_sizeremains unsupported withsp_size.ep_dispatch_experts) andefsdp = fsdp * sp * tp // epalready work out of the box since each SP rank dispatches only its local token slice.set_gradient_divide_factor(dp_size)) already accounts forsp_sizethroughdp_size; only the comment infsdp.pyis updated.all_reduceEP continues to requireep_size == tp_size(each TP group holds the same SP slice).Tests
Added forward and backward equivalence tests against an unsharded tiny
Qwen3MoeForCausalLMintests/sequence_parallel/test_sequence_parallel.py(CPU /gloo), covering:ep_sp(unpacked,packed,padded),fsdp_ep_sp,efsdp_ep_sptp_ep_sp(ep > tp),tp_ep_sp_auto(ep == tp),all_reduce_ep_sphsdp_ep_sp,hsdp_efsdp_ep_sp,fsdp_tp_ep_sp,hsdp_tp_ep_sp