Skip to content

[CI] Shard LoRA TP (Distributed) into 4 timing-balanced groups - #52350

Draft
khluu wants to merge 3 commits into
mainfrom
ci-shard-lora-tp-distributed
Draft

[CI] Shard LoRA TP (Distributed) into 4 timing-balanced groups#52350
khluu wants to merge 3 commits into
mainfrom
ci-shard-lora-tp-distributed

Conversation

@khluu

@khluu khluu commented Aug 14, 2026

Copy link
Copy Markdown
Member

Purpose

Phase 2 of the CI job-splitting effort (45–60m jobs → shards <20m). lora-tp-distributed ran 45.4m in build 83851.

Validation (terminal, build 83941, VLLM_CI_BRANCH=amd-mirror-parallelism-override @ e006ba64)

Targeted build 83941 on this exact head: 4/4 passed, walls 13.58 / 14.22 / 12.93 / 9.35m — max 14.22m with real margin (3.19× vs baseline).

  • Executed union (session nodeids): shard 0 {gptoss 12.12m}, shard 1 {llama 8.87m, qwen35 3.90m}, shard 2 {olmoe 3.98m, gemma4 7.48m}, shard 3 {chatglm3 2.45m, qwen3_with_multi_loras 5.48m} — all 7 files exactly once, disjoint, flags (-v -s -x) and both env exports unchanged; the 0–3 index validator ran first on every shard.
  • Fixed setup: 1.42–1.47m/shard (uniform this run).
  • Accelerator tradeoff (4 GPUs per shard): peak 4 → 16 GPUs; total 200.3 vs 181.6 baseline GPU-min (+10.3%); wall 45.4 → 14.22m.

Approach

parallelism: 4 with per-shard command guards plus a fail-closed BUILDKITE_PARALLEL_JOB 0–3 validator. Buckets balanced on per-file walls that were stable across three runs (83921/83936/83941): gptoss (12.1–12.2m) is the single-file floor and gets its own shard, so N=4 is also the ceiling of useful N.

Why 4-way

The N=3 layout validated green twice but was rejected on margin: per-file test time was stable across runs, but fixed setup varied 1.3–4.9m on identical work (83936 shard 1 hit a 4.93m outlier → 19.52m wall, 0.48m margin). The N=3 buckets already sat at the ~14.5m balance ideal, so no 3-way arrangement stays safely under 20m when the setup tail hits. N=4 projects ~17.1m even with the observed worst-case setup. Builds 83921/83936 remain rejected-margin evidence with valid 7/7 union proofs.

Notes

  • No open PR shards this job (checked gh pr list for the step key and file; the sharding merged to main for the single-GPU lora step is a different key, rebased over cleanly).
  • AI assistance was used for this change.

@mergify mergify Bot added the ci/build label Aug 14, 2026
khluu added 3 commits August 14, 2026 15:16
Split the 7 sequential per-file pytest commands of lora-tp-distributed
(~45.4m wall in build 83851) across parallelism: 3 using per-shard command
guards, balanced on measured per-file runtime: shard 0 ~15.2m
(gptoss 12.7m + chatglm3 2.5m), shard 1 ~15.3m (llama 7.4m + gemma4 7.9m),
shard 2 ~14.3m (qwen3_with_multi_loras 6.0m + qwen35_densemodel 4.2m +
olmoe 4.1m). Both env exports still run on every shard; file flags (-x)
unchanged; every file runs on exactly one shard. Timeout 60 -> 25.
num_devices: 4 is per shard, so peak accelerator use goes 4 -> 12 while
wall drops ~45m -> ~16m.

Signed-off-by: Kevin Luu <51931015+khluu@users.noreply.github.com>
An index outside 0-2 would skip every per-shard guard and let the job
pass empty; validate BUILDKITE_PARALLEL_JOB explicitly before any test
command and exit 1 with a diagnostic otherwise.

Signed-off-by: Kevin Luu <51931015+khluu@users.noreply.github.com>
Two validation runs (83921, 83936) show per-file test time is stable
(max delta 0.23m) but fixed setup varies 1.3-4.9m on identical work.
The N=3 buckets already sit at the 14.5m balance ideal, so no 3-way
arrangement stays safely under 20m when the setup tail hits; move to
parallelism: 4 with gptoss (12.2m, single-file floor) isolated:
{gptoss} / {llama, qwen35} / {gemma4, olmoe} / {qwen3_multi, chatglm3}
= 12.2/11.4/11.2/8.6m test, worst-observed-setup projection ~17.1m.
Index validator now accepts 0-3; exports, flags, per-file guards and
exact once-each coverage unchanged.

Signed-off-by: Kevin Luu <51931015+khluu@users.noreply.github.com>
@khluu
khluu force-pushed the ci-shard-lora-tp-distributed branch from b28aa58 to afa3315 Compare August 14, 2026 15:16
@khluu khluu changed the title [CI] Shard LoRA TP (Distributed) into 3 timing-balanced groups [CI] Shard LoRA TP (Distributed) into 4 timing-balanced groups Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant