Repository navigation
Conversation
This was referenced Nov 9, 2026
|
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. |
This was referenced Nov 9, 2026
3outeille
force-pushed
the
cp-4-tester-mixin
branch
from
November 9, 2026 14:37
6ca35b2 to
a819e0f
Compare
This was referenced Nov 9, 2026
3outeille
force-pushed
the
cp-7-auto-pad
branch
from
November 10, 2026 02:51
043fd08 to
274c694
Compare
3outeille
force-pushed
the
cp-4-tester-mixin
branch
from
November 10, 2026 02:51
a819e0f to
0d5d70f
Compare
3outeille
force-pushed
the
cp-7-auto-pad
branch
from
November 10, 2026 03:01
274c694 to
a5d8617
Compare
3outeille
force-pushed
the
cp-4-tester-mixin
branch
from
November 10, 2026 03:01
0d5d70f to
c23c568
Compare
3outeille
force-pushed
the
cp-7-auto-pad
branch
from
November 10, 2026 05:19
a5d8617 to
ed0c679
Compare
3outeille
force-pushed
the
cp-4-tester-mixin
branch
from
November 10, 2026 05:19
c23c568 to
d190690
Compare
3outeille
force-pushed
the
cp-7-auto-pad
branch
from
November 10, 2026 05:45
ed0c679 to
0473203
Compare
3outeille
force-pushed
the
cp-4-tester-mixin
branch
from
November 10, 2026 05:45
d190690 to
681346a
Compare
3outeille
force-pushed
the
cp-7-auto-pad
branch
from
November 10, 2026 06:03
0473203 to
811cfea
Compare
3outeille
force-pushed
the
cp-4-tester-mixin
branch
2 times, most recently
from
November 12, 2026 06:19
6df787f to
ebf1bd8
Compare
3outeille
force-pushed
the
cp-7-auto-pad
branch
from
November 12, 2026 07:15
dca9b1c to
df47b56
Compare
3outeille
force-pushed
the
cp-4-tester-mixin
branch
from
November 12, 2026 07:15
ebf1bd8 to
b1bab1d
Compare
3outeille
force-pushed
the
cp-7-auto-pad
branch
from
November 12, 2026 08:01
df47b56 to
ed345b3
Compare
3outeille
force-pushed
the
cp-4-tester-mixin
branch
from
November 12, 2026 08:01
b1bab1d to
9d9f21d
Compare
3outeille
force-pushed
the
cp-7-auto-pad
branch
from
November 12, 2026 09:14
ed345b3 to
ed63651
Compare
3outeille
force-pushed
the
cp-4-tester-mixin
branch
from
November 12, 2026 09:14
9d9f21d to
d692857
Compare
3outeille
force-pushed
the
cp-7-auto-pad
branch
from
November 12, 2026 09:29
ed63651 to
d5bdb5c
Compare
3outeille
force-pushed
the
cp-4-tester-mixin
branch
2 times, most recently
from
November 12, 2026 10:09
f9e3c95 to
1ded7ce
Compare
… model `ContextParallelTesterMixin` joins the bases of `CausalLMModelTest`, next to the FSDP and tensor parallel mixins, so every causal language model test class runs its tester's tiny config on 2 ranks: `cp_size=2` over the whole batch, with the loss, this rank's slice of the logits and every gradient compared against the unsharded run. The packed variant restarts `position_ids` mid-sequence, which the mask of every model then has to rebuild. A tester config is only changed when the context parallel checks refuse it and the change is harmless: the auxiliary load-balancing loss of the MoE models is turned off. The change is verified by building the model from the config a checkpoint reloads, which is the config the workers get. A model the checks still refuse is loaded with `cp_size=2` on both ranks and has to raise `ValueError`; the test then skips with the reason. The allow-list starts with 7 model types that run today. Set `CONTEXT_PARALLEL_TEST_MODEL_TYPES = None` to run every causal language model.
3outeille
force-pushed
the
cp-9-ep-x-cp
branch
from
November 12, 2026 10:32
a32f0d5 to
c4ceb06
Compare
3outeille
force-pushed
the
cp-4-tester-mixin
branch
from
November 12, 2026 10:32
1ded7ce to
c75251d
Compare
Member
Author
Member
Author
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 → #50511 → #50514 → this PR → #50521 → #50522
Adds
ContextParallelTesterMixintoCausalLMModelTest, so every causal LM gets two tests,test_cp_matches_unshardedandtest_cp_matches_unsharded_packed. Each test runs on 2 CPU ranks withcp_size=2and checks that the loss, the logits of each rank's slice, and every gradient match an unsharded run of the same weights.output_router_logits=False, because the MoE auxiliary loss is not a sum over tokens.cp_size=2raises, then skips with the reason.CONTEXT_PARALLEL_TEST_MODEL_TYPES) limits CI to 7 model types, like the FSDP mixin. The tests carryis_fsdp_test.Tests
With the allow list off, over the 95 causal LM test classes:
The refusals: attention outside the attention interface, eager-only models, linear attention, recurrent or conv layers, sparse indexers, a single key/value head, layers the default plan does not name (GPT-2, jetmoe, ...), and the models that set
base_model_cp_plan = Nonein #50496 (gemma3n, gemma4 andgemma4_unified, which inherits it, beam, ministral3).