Repository navigation
[CI] Use TP2 for Qwen3.5 35B target-only evaluation - #117
Conversation
fe52702 to
524153b
Compare
524153b to
3146e8d
Compare
- Rename the launcher and set its tensor parallel size to two. - Update the CI case and evaluation guide to use TP2. - Retain the existing accuracy gate pending TP2 validation. Signed-off-by: Xiake Sun <[email protected]>
3146e8d to
7f06241
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
TP2 validation on the target MI308X ROCm GPUs is still pending, and CPU checks cannot establish startup compatibility, memory fit, or compliance with the retained GSM8K acceptance gate.
No open issues 🎉
What changed in this PR
Switches Qwen3.5 35B target-only evaluation from four GPUs to two, keeping the launcher, CI case definition, and evaluation guide aligned.
Changes:
- Renames the launcher and CI selector to TP2 and sets tensor parallelism to two GPUs.
- Updates the default log filename, guide launch command, case order, and accuracy table.
- Retains the TP4 accuracy reference as the acceptance gate pending TP2 GPU validation.
| File | Description |
|---|---|
scripts/ci/qwen4_ci.py |
Updates the case ID, GPU count, and launcher path for TP2. |
evaluation/Qwen4_Evaluation_Guide.md |
Aligns launch instructions and CI documentation with TP2. |
evaluation/launch_qwen3.5-35B-fp8_tp2_disable_prefix_cache.sh |
Renames the launcher and configures two GPUs with a matching log filename. |
Review effort: Balanced
Signed-off-by: Xiake Sun <[email protected]>
Signed-off-by: Xiake Sun <[email protected]>
PR #117 MI308X CI comparison
Performance deltas are Accuracy and latency
Throughput and speculative decoding
Key Takeway
|
|
Rerun on another MI308X PTL machine for Accuracy and latency
Throughput and speculative decoding
Key Takeway
|
…e over SDMA (on by default) (#118) * [AMD] Qwen3.5 TP2 prefill: overlap the layer all-reduces with compute over SDMA Qwen3.5-35B-A3B TP2 prefill spends ~28% of its GPU time in the two all-reduces per layer (RCCL at the xGMI limit for 32k-token batches). Apply the Qwen4-Exp SDMA overlap to Qwen3.5's plain residual stream: at TP2 an all-reduce is "push the partial to the peer, then add", so the residual stays replicated. - out_proj / o_proj run in row chunks; each chunk's partial is pushed to the peer over SDMA (mori, SdmaAllGather writer) as soon as it is computed. - Per landed chunk: rank 0 rows + rank 1 rows (bit-identical on both ranks), residual add + RMSNorm, then the MoE on that chunk with its all-reduce skipped; its output is pushed the same way and consumed by the next layer's input norm chunk by chunk. Eager TP2 EXTEND batches of Qwen3.5 MoE (qwen3_5_moe_text) only; everything else, including Qwen4-Exp / Qwen3.8, keeps its path. Shares the Qwen4 switches (no new environment variable): SGLANG_QWEN4_SP_SDMA_RS (default on), SGLANG_QWEN4_SEQ_PARALLEL_MIN_TOKENS (2048) and SGLANG_QWEN4_SP_SDMA_RS_CHUNKS (Qwen3.5 default 4). Without mori the all-reduce runs, with a warning. The TP2 launcher sets the mori runtime environment. Signed-off-by: Ethan Yang <[email protected]> * [AMD] Qwen3.5 35B TP2 launcher: FlyDSL GDN decode Select the gfx942 FlyDSL fused GDN decode kernel (qkvz/ba unpack + conv1d update + recurrence in one launch) with --linear-attn-decode-backend aiter. Qwen3.5 shares Qwen3_5GatedDeltaNet with Qwen3.8; at TP2 it runs 8 k-heads / 16 v-heads per rank (ratio 2), which the kernel's (H, HV) JIT covers. Signed-off-by: Ethan Yang <[email protected]> * Qwen4 CI: require the Qwen3.5 35B TP2 fast paths; SDMA all-reduce bench and docs - qwen4_ci.py: Qwen3.5-35B-TP2-Base fails when its server log lacks the FlyDSL GDN decode or, after the performance phase, the SDMA all-reduce line, so a missing mori cannot pass silently. Accuracy-only runs, which may stay below the 2048-token threshold, only require the decode line. - test_qwen4_ci.py: cover the check and give the #117 workload test a server log with both lines. - benchmark/qwen4_seq_parallel: two-GPU correctness and layer timing for the Qwen3.5 SDMA all-reduce; README section with the serving results. - Evaluation guide: the 35B TP2 launcher's SDMA / mori requirement and the new CI check. Signed-off-by: Ethan Yang <[email protected]> * [AMD] Qwen3.5 SDMA all-reduce: chunk count follows the batch size Each row chunk re-runs the MoE (gate, topk, sorting, quant, two GEMMs), the projection quant + GEMM and the add + norm, about 7 ms of host time per layer at 4 chunks regardless of the batch size. Small prefills were host-bound: single 4k-token requests went from 132 ms to 338 ms (GPU idle 329 of 434 ms), which cancelled the large-batch gain in the 8k-token CI workload's TTFT. Single-request prefill latency on MI308X TP2 (ms): tokens all-reduce 1 chunk 2 chunks 4 chunks 4096 132 143 199 338 8000 225 233 223 342 12000 337 362 298 352 16000 460 483 399 386 24000 724 740 657 598 32000 1021 1041 924 842 - Batches under 8192 tokens keep the all-reduce; 2 chunks up to 16383 tokens, 4 from 16384. - SGLANG_QWEN4_SEQ_PARALLEL_MIN_TOKENS and SGLANG_QWEN4_SP_SDMA_RS_CHUNKS still override, but only when set: their defaults are Qwen3.8's. - CI: smoke runs send single 8k prompts, now under the threshold, so the SDMA log line is only required after the full performance phase. Signed-off-by: Ethan Yang <[email protected]> * qwen4_seq_parallel README: Qwen3.5 results from run_qwen35_pure_text_bench.sh defaults Signed-off-by: Ethan Yang <[email protected]> * [AMD] Qwen3.5 SDMA all-reduce: harden the gating - Keep the all-reduce with speculative decoding (MTP drafts got accept length 1.0 on this path) and with LoRA (its wrappers replace o_proj / out_proj and bypass the chunked push, which raised on the first large prefill); also check at init that every projection is still wrapped. - Size the receive buffers to min(max prefill, chunked prefill) tokens and keep the all-reduce for larger batches; log the buffer size. - Require bf16 activations and a TP-partial MoE output. - Agree on SDMA availability across ranks before the group collective. - Disable the path after an exception mid-forward. - Reject SGLANG_QWEN4_SP_SDMA_RS_CHUNKS < 1. - Trim comments; README notes the excluded cases; the shared mori warning no longer names the aiter reduce-scatter. Signed-off-by: Ethan Yang <[email protected]> --------- Signed-off-by: Ethan Yang <[email protected]>
Motivation
Run Qwen3.5 35B target-only evaluation with two GPUs through both the evaluation guide and Qwen4 CI. The case selector becomes
Qwen3.5-35B-TP2-Base.Modifications
launch_qwen3.5-35B-fp8_tp4_disable_prefix_cache.shtolaunch_qwen3.5-35B-fp8_tp2_disable_prefix_cache.sh, set--tp-size 2, and update the default log filename../run_qwen35_pure_text_bench.shfor the fullQwen3.5-35B-TP2-Baseperformance case withMAX_CONCURRENCY=8andNUM_PROMPTS=256. CI checks all 256 completions. Smoke runs use two prompts at concurrency 1.Accuracy Tests
python3 -m pytest scripts/ci/test_qwen4_ci.py -qpassed all 75 CI driver tests.Speed Tests and Profiling
A CPU check exercised the CI driver and benchmark shell script with a stub client, verifying 256 prompts, concurrency 8 and 10 warmups for the full TP2 base case. GPU accuracy and performance validation runs in Qwen4 CI.
Checklist
git diff --checkpassed.