Repository navigation
qwen3_ssm: wide-batch dense-FFN crossover n>=9 on gfx1151 (27B C8 decode +43%) + DevLab concurrent-decode A/B script - #278
Conversation
…decode +43%) ssm_ffn_prefill_min_n() routes the SSM layers' dense FFN to the tile GEMMs (forward_prefill) from n = MIN_N up. Below that it uses the batched GEMV (try_forward_km). Its default of 5 was measured on GB10, where the tile GEMM wins from n=5. On gfx1151 it is the slow arm at M=8. Framework f119 (27B, C=8 AR): the 48 GDN-layer MLPs on w4a16_gemm_t / _k64 were 35.6% of the decode window, while the attention layers' MLPs stayed on the batched GEMV. Framework f120 (27B AR, Gufo protocol, 2 interleaved rounds), MIN_N 5 -> 9: - C1: 11.9 -> 11.9 tok/s - C4: 39.3 -> 39.3-39.4 tok/s - C8: 34.4 -> 49.2-49.3 tok/s (+43%) The default is now 9 under atlas_hip and stays 5 elsewhere. ATLAS_SSM_FFN_PREFILL_MIN_N still overrides. Single-sequence decode is unchanged. MoE FFNs never take this arm (is_dense). Co-Authored-By: Claude Opus 5.5 <[email protected]>
ab_prefill.sh times C=1 prefill, which cannot judge a C>1 change such as this branch's batched dense-FFN crossover. ab_decode_conc.sh builds the base ref in a sibling worktree like its twin and alternates serves at MAX_BATCH 8. Per round it measures the steady all-decoding aggregate at C = 1 / 4 / 8 (128-token greedy streams). Round 1 also counts how many of 8 concurrent replies equal the same prompt served alone. Same KEY=VAL env passthrough and memory waits as ab_prefill.sh. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…27B load on the runner) Run 41181983380 failed at model build: cuMemAlloc of 2 GB with 1.2 GB free. The batch-8 SSM pools need more headroom than ab_prefill's batch-1 recipe, so this script now defaults to 0.70. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
strix (Z13) numbers, s151 (27B AR, Gufo protocol, 2 interleaved rounds, util 0.82): C1 9.9 / 9.6 → 9.9 / 9.8; C4 27.8 / 26.6 → 26.3 / 25.9 (tablet noise; the change cannot engage at C4, it only affects 5..8-row batches); C8 20.5 / 20.0 → 31.0 / 30.1 (+50%). With DevLab (+91%, run 41182965151) and framework f120 (+43%), that is three machines. The f122 accuracy gate (8 concurrent ST-995 clients) is at ~7,500/7,960 requests. |
|
With MTP on (serve default NUM_DRAFTS=3), strix s152: C8 17.7 / 17.5 → 21.9 / 21.7 (+24%); C1 and C4 within noise. Separately (not this PR): at C8, MTP (21.9) now trails AR (31.0, s151) on the same build. Speculation costs more than it gains at high concurrency; s153 sweeps draft depth vs C. |
|
Accuracy gate PASSED (framework f122): 8 ST-995 clients concurrently against one server (MAX_BATCH 8, MIN_N 9), every client 84.02 overall / 74.95 normalized. The paired sequential run on the same build (strix s144) is 84.12 / 74.95: one item out of 995 on overall, identical normalized. Throughput on three machines: framework C8 +43%, DevLab +91%, strix +50% (AR) / +24% (MTP). DevLab build of e67b76d is green (41187651309), and CI is green. Merging. |
Two commits.
1. e321494:
ssm_ffn_prefill_min_n()default 9 onatlas_hip(5 elsewhere). From n = MIN_N up, the SSM layers' dense FFN takes the tile GEMMs (forward_prefill); below it, the batched GEMV (try_forward_km). The default of 5 was measured on GB10. On gfx1151 the tile GEMM is the slow arm at M=8. In framework f119 (27B C=8 AR rocprof), the 48 GDN-layer MLPs onw4a16_gemm_t/_k64were 35.6% of the decode window, while the attention layers' MLPs stayed on the batched GEMV.Single-sequence decode is unchanged. MoE FFNs never take this arm.
ATLAS_SSM_FFN_PREFILL_MIN_Nstill overrides.Concurrency identity (f121, 8 prompts, greedy 64 tok, solo vs all-at-once): 6/8 rows identical with MIN_N 9 vs 7/8 with MIN_N 5. Divergences start after ~50 chars, and one row diverges under both (pre-existing batched-decode numerics). Accuracy gate in progress: ST-995 can't exercise C>1 by itself, so framework f122 runs 8 ST-995 clients concurrently against one server. The paired sequential ST-995 on this build (strix s144) is 84.12 / 74.95.
2. e4921e6:
scripts/devlab/ab_decode_conc.sh. A concurrent-decode A/B for the DevLab runner (the prefill twin can't judge a C>1 change): C = 1/4/8 steady aggregate, plus a solo-vs-C8 identity count, base vs test. First use: run 41181983380 (this branch vs main).Merges once f122 and the DevLab A/B report.
🤖 Generated with Claude Code