Expect AutoTP to keep a row-parallel output head tied to the embedding #8855
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.46) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.46 · 459 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.367
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #8855"
general
weight: 0.35
delock
Summary
Fixes a stale test expectation.
TestTiedOutputHead::test_row_parallel_tied_head_is_refused[False/True]intests/unit/v1/moe/test_autoep_autotp_sharded_attention.pyfails on master:The test (added in #8670) expects AutoTP to refuse a row-parallel output head whose weight is tied to the input embedding. Since 3c6a5ca95 ("[AutoTP] Support tied embeddings for row-parallel…"), AutoTP supports this case: it replaces the embedding with a
HiddenParallelEmbeddingthat shares the head's sharded weight. The two changes landed a day apart, so the expectation was already stale when #8670 merged.Change (test only, no runtime code modified):
test_row_parallel_tied_head_keeps_the_tie.zero.Init, check afterdeepspeed.initializethat the embedding is aHiddenParallelEmbeddingandlm_head.weight is embed_tokens.weight.cpu-torch-multi-latest). Before, it skipped on CPU and needed 4 GPUs, so no nightly ran it: the GPU nightly (ci/torch_latest.py) has exactly 2 GPUs. The check only builds the engine, so it needs no accelerator: drop the CPU skip and mark itsequential, because that nightly selects tests underunit/v1only through its sequential phase. It keeps 4 ranks, which that nightly admits (LOCAL_SIZE=4).The original concern of the test still holds: under
zero.InitAutoTP gathers the partitioned head weight into a new parameter, and if the embedding kept the old one the two would train as separate copies. The identity check catches that. Numerical training parity of a tied row-parallel head is already covered byTestTiedRowParallelOutputHeadTrainingintests/unit/v1/autotp/test_autotp_training.py.Related work
No open PR fixes this test. #8829 and #8848 both list these two failures as pre-existing and leave them unchanged. I searched open PRs touching
TestTiedOutputHeadand tied/vocab-parallel output heads.Tests
| Test | master
cc7b5125d| This PR ||---|---|---|
|
TestTiedOutputHead[zero_init=False]| failed on XPU (AssertionErrorabove) | passed on CPU (4 gloo ranks) and XPU (4 ranks) ||
TestTiedOutputHead[zero_init=True]| failed on XPU (AssertionErrorabove) | passed on CPU (4 gloo ranks) and XPU (4 ranks) |pre-commit run --fileson the changed file passes.Hardware and software:
Compatibility matrix
Test-only change; no numerics, performance or memory impact.
| | Validated | Not validated |
|---|---|---|
| ZeRO | Stage 3, with and without
zero.Init(as in the test) | Other stages (not exercised by this test) || Precision | fp32 | |
| Offload | | Not exercised |
| Parallelism | AutoTP 2 × AutoEP 2 folding, world size 4 | |
| Accelerator | CPU, XPU | CUDA (not run locally; the GPU nightly does not select
sequentialtests) |AI assistance
This PR was developed with AI assistance (GitHub Copilot CLI). I reviewed every changed line and ran the tests above.
cc @pengdurice @0z5a @delock