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-6-tp-x-cp
branch
from
November 9, 2026 14:25
5acd8bd to
2b71a64
Compare
This was referenced Nov 9, 2026
3outeille
force-pushed
the
cp-6-tp-x-cp
branch
from
November 9, 2026 14:37
2b71a64 to
210c54b
Compare
This was referenced Nov 9, 2026
3outeille
force-pushed
the
cp-6-tp-x-cp
branch
from
November 10, 2026 02:50
210c54b to
59258f7
Compare
3outeille
force-pushed
the
cp-6-tp-x-cp
branch
from
November 10, 2026 03:01
59258f7 to
37cf584
Compare
3outeille
force-pushed
the
cp-6-tp-x-cp
branch
from
November 10, 2026 05:19
37cf584 to
a64ce5d
Compare
3outeille
force-pushed
the
cp-6-tp-x-cp
branch
from
November 10, 2026 05:44
a64ce5d to
9a8e25a
Compare
3outeille
force-pushed
the
cp-6-tp-x-cp
branch
from
November 10, 2026 06:03
9a8e25a to
752288d
Compare
3outeille
force-pushed
the
cp-6-tp-x-cp
branch
2 times, most recently
from
November 16, 2026 08:03
2512a3a to
5e27442
Compare
3outeille
force-pushed
the
cp-6-tp-x-cp
branch
from
November 16, 2026 08:07
5e27442 to
7148bf2
Compare
3outeille
force-pushed
the
cp-6-tp-x-cp
branch
from
November 16, 2026 08:20
7148bf2 to
3c59080
Compare
3outeille
force-pushed
the
cp-6-tp-x-cp
branch
from
November 16, 2026 08:21
3c59080 to
584757f
Compare
3outeille
force-pushed
the
cp-6-tp-x-cp
branch
from
November 20, 2026 06:58
584757f to
086f727
Compare
distributed] Context parallelism with tensor parallelismdistributed] Sequence parallelism with tensor parallelism
3outeille
force-pushed
the
cp-6-tp-x-cp
branch
from
November 20, 2026 08:49
086f727 to
d588c43
Compare
3outeille
force-pushed
the
cp-6-tp-x-cp
branch
from
November 30, 2026 06:27
d588c43 to
ded18cc
Compare
3outeille
force-pushed
the
cp-6-tp-x-cp
branch
from
November 30, 2026 07:08
ded18cc to
45daeba
Compare
3outeille
force-pushed
the
cp-6-tp-x-cp
branch
2 times, most recently
from
December 2, 2026 06:21
c42e315 to
a57e86c
Compare
FSDP2 composes the mesh it shards over (`sp`, or `fsdp_sp` with `fsdp_size > 1`) with the `tp` mesh the parameters are already sharded on, and torch only composes meshes built from the same root: both are dims of the dense mesh, or of the `fsdp_sp` root mesh it is unflattened from. Under TP this rank holds `num_heads / tp_size` heads and Ulysses splits those across the sp group, so `sp_size * tp_size` must divide the attention and key/value heads.
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 → this PR → #50514 → #50521 → #50522
Enables combining sequence parallelism with tensor parallelism via
DistributedConfig(tp_size=T, sp_size=S)(also works withfsdp_sizeanddp_replicate_size):tp_size > 1withsp_size > 1inDistributedConfig(pp_sizeandep_sizeremain disallowed for now). Ranks in atpgroup receive the same batch and the same sequence slice.UlyssesAttention: under TP each rank holdsnum_heads / tp_sizeheads, which Ulysses splits acrossspranks, sosp_size * tp_sizemust divide bothnum_attention_headsandnum_key_value_heads.Tests
Added TP + SP coverage in
tests/sequence_parallel/test_sequence_parallel.py(reusing the forward/backward helpers fromtests/test_sequence_parallel_mixin.py):tp_size > 1.gloo):tp=2 × sp=2(4 ranks):unpacked,packed,paddedfsdp=2 × tp=2 × sp=2(8 ranks):packeddp_replicate=2 × tp=2 × sp=2(8 ranks, HSDP):packed