Repository navigation
TP / PP gloo tests: build from pinned tiny-repo revisions - #18425
Conversation
…3 default trl-internal-testing/tiny-Qwen3ForCausalLM was re-uploaded (92ee0a3c80) with head_dim 16 instead of 128. test_kv_heads_below_tp_are_replicated_per_rank hardcoded 128 for the expected per-rank KV rows, so it fails wherever the new config is fetched (always on a cold Hub cache, intermittently in the gloo-tp-env shard). Pin head_dim in the test's own overrides and derive the expected rows from it.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
The gloo tensor and pipeline parallel builders read a tiny Hub repo's config.json at its latest revision and build random weights from it, so an upstream re-upload changes every compared number. trl-internal-testing/tiny-Qwen3ForCausalLM's re-upload (head_dim 128 to 16) also moved test_tp2_tied_norm_weight_is_summed_once past its parity tolerance (7.4e-6 vs 3.4e-6), and tiny-Qwen3MoeForCausalLM was re-uploaded the same day. Pin every fixture repo the two builders use in tests/_tiny_fixture_revisions.py (Qwen3 and Qwen3-MoE at the revision before the re-upload, the rest at their current revision), load configs at the pin, and add a guard that fails when a builder module names a tiny repo without a pin.
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Two gloo tests started failing in the CPU tensor-parallel shards on several unrelated PRs (#18290, #17550):
On a host with a cold Hugging Face cache, both fail every time, including on commits from before any recent tensor-parallel change.
Cause
Not a code change. The gloo tensor and pipeline parallel builders (
build()intests/test_tp_native_oracle.pyandtests/test_pp_native_gloo.py) read a tiny Hub repo'sconfig.jsonat its latest revision and build random weights from it.trl-internal-testing/tiny-Qwen3ForCausalLMwas re-uploaded upstream on 2026-11-19 (commit92ee0a3c80), and its config changedhead_dimfrom 128 to 16:25bb9b8963(previous)92ee0a3c80(current)test_kv_heads_below_tp_are_replicated_per_rankhardcoded 128 for the expected per-rank KV row slice.test_tp2_tied_norm_weight_is_summed_oncecompares parity values that the new shapes move just past their tolerance.Runners that still have the old config cached pass and fresh fetches fail. That is why the same base, with the same package versions (transformers 5.18.0, torch 2.10.0), was green on some PRs and red on others.
trl-internal-testing/tiny-Qwen3MoeForCausalLMwas re-uploaded the same day.The tensor-parallel code is correct. It slices by the config's
head_dim.Fix
Test-only:
tests/_tiny_fixture_revisions.pypins a full commit id for every tiny repo the two builders use:AutoConfig.from_pretrained(repo, revision = revision(repo)). Moving a fixture is now a deliberate edit to the pin table.tests/test_tiny_fixture_revisions_pinned.pyfails if either builder module names a tiny repo without a pin, if a pin is not a full commit id, or if a builder stops loading at the pin.test_kv_heads_below_tp_are_replicated_per_rankalso pinshead_dimin its own overrides and derives the expected rows from it, so it states the shape it checks.Verification
test_tp_kv_replicated_gloo.py, maintest_tp_kv_replicated_gloo.py, this branchtest_tp_native_gloo.py(tied_norm), maintest_tp_native_gloo.py, this branchtest_pp_native_gloo.py, this branchtest_tiny_fixture_revisions_pinned.pytp_native.pysabotaged to give every rank KV head 0(0, 16))So the per-rank KV head check still catches wrong slicing. ruff is clean.