Skip to content

[job] Qwen3.8-Flash-Next on Strix Halo: decode speed (serial and MTP) #143

Open

Description

@AzeezIsh

Status (updated 2026-10-28 05:30Z)

State: in progress. Linux framework (gfx1151, 96 GB), Flash-Next NVFP4, on main since #197 (8863dc5e5). Gufo-matched rows, greedy, thinking off.

  • Single stream:
    • AR tg 12.2 tok/s; MTP1 tg 18.6 at depth 0.
    • Gufo AR is 28.3, and MTP on mixed text is 36–40.
  • Past the QSA bound:
    • MTP turned off above ~2k tokens (12.1 tok/s at 8k/32k).
    • ATLAS_QSA_VERIFY_ACTIVE=1 brings it back: 18.9 / 18.0 tok/s (f55).
    • Default flip on branch perf/hip-qsa-verify-active-default 88cffac78. Accuracy is already covered by gates that ran with =1. f58 proves the flip.
  • Concurrency:
    • Steady C=1/4/8 is 12.2 / 14.3 / 15.0 tok/s; Gufo AR C=8 is 125.
    • Routed + shared MoE does not amortize across rows (f50: 66.8 launches/token at C1 and C4, 56% of the C4 step).
  • Where the bytes go: an AR token reads ≥ 8.5 GB here (GDN, HC and head are BF16 in the NVIDIA checkpoint) against ~6 GB for Gufo. Kernel efficiency is the larger gap. Source analysis is in comment 6435247605; it is inference.
  • Dead ends (findings only):

Next: a gfx1151 batched MoE decode kernel (expert dedup across rows plus wave32 int8 dot).


Why: decode is where the Strix Halo port is furthest from what gfx1151 can sustain. Measured on winbox (Ryzen AI Max+ 395, Windows 11, ROCm 10 / TheRock, VGM 32 GB), C=1, greedy, thinking off, 256-token completions:

arm decode fingerprint
serial ≈ 9.5 tok/s #80 c6efb5f60, win_serve_flashnext_nvfp4.ps1 boot-7g, 2026-09-28 (26.5 / 27.9 s per 256 tokens)
MTP K=2 17.5 tok/s, p1 0.977 #80 c6efb5f60 + launcher commits 63ec00e4f, binary 710CA023, serve-amd.ps1 -Model qwen3.8-flash-next, 2026-09-30

Single observations: they locate the gap, but they aren't a baseline to gate on. Step 1 re-measures with n ≥ 3.

Done bar (C=1, greedy, serve-amd.ps1 -Model qwen3.8-flash-next and the Linux equivalent on the 128 GB box):

Plan, each step gated by the one before:

  1. Measure (no code): a launch-mode profile of one serial and one MTP decode step, on Windows and on Linux. Split the step time into MoE expert GEMV, hyper-connection (mHC), attention/QSA, GDN, lm_head, and dispatch/copy overhead. Report achieved GB/s per kernel against the ~256 GB/s LPDDR5X bus. The biggest item decides step 2.
  2. Attack the top two items. Candidates already known from other targets:
  3. Stretch: make MTP verify bit-identical to single-token decode, so speculation is output-exact rather than tie-class.

Related: #57 (the port), #72 (Strix 27B decode/prefill), #130 (MTP drafting on GB10).

Activity

  1. added
    job
    on Sep 30, 2026
  2. AzeezIsh commented on Oct 2, 2026

    @AzeezIsh
    ContributorAuthor

    Decode-graph design for Flash-Next. This gets built only if the Windows trace confirms launch overhead; the trace runs in Claude's winbox slot after #80's ST-995.

    Already established from code:

    What blocks capture: position-dependent launch parameters in QSA.

    launch position-dependent part graph-safe form
    qsa_qprep pos argument (RoPE) read pos from the device positions buffer
    qsa_score grid = complete blocks fixed max grid, CTAs ≥ complete_dev exit
    qsa_select_topk_radix complete / tail_start / visible args derive from device pos (it already writes sel)
    qsa_gather grid = n_sel fixed max grid (block_topk·ratio + ratio), device n_sel
    qsa_block_pool n_new, first_block (host counters) device-computed; no-op unless (pos+1) % ratio == 0
    raw-key ingest copy_d2d at offset pos·hd a 1-CTA kernel reading pos
    identity table / seq_len H2D per-step uploads table pre-filled once at alloc; select kernel writes seq_len_dev

    Host bookkeeping: graph replay skips Rust code, so st.ingested / st.pooled advance in a per-step hook, the PLE decode_prestage / rearm pattern.

    Capture per regime: inert (≤ 2051), device top-k (≤ 16,384 blocks), eager host arm beyond. A graph is never replayed across a regime boundary.

    Gate: greedy byte-identity graph vs eager at 2050 / 2051 / 2052 tokens, at 4095 / 4096 / 16,384 blocks, and past 16k; then ST-995 + replay.

    Success measure: Windows serial decode step time vs Σ GPU time from the trace. The gap between the two is the ceiling of what this can recover.

  3. AzeezIsh commented on Oct 2, 2026

    @AzeezIsh
    ContributorAuthor

    #143 step 1, first data: per-kernel GPU time of one Windows Flash-Next decode iteration. This is an observation from one traced request, not a production rate.

    Fingerprint:

    • winbox (gfx1151, Windows), 2026-10-02 09:53Z.
    • Landing binary 577F510D (Strix Halo Windows: Flash-Next port on main + MoE prefill transpose (2k TTFT ~2x) (supersedes #54) #80 + launcher commits + main be435875c), serve-amd.ps1 -Model qwen3.8-flash-next -Thinking off, recipe default seq.
    • ATLAS_TRACE_LAUNCH=1 ATLAS_TRACE_LAUNCH_SYNC=1. Every launch is serialized, so per-kernel GPU time is exact, but the traced wall time isn't the production step time.
    • One greedy request, "Count from 1 to 40", 40 tokens. The prompt is short, so the QSA selection is inert.
    • SERIAL=1 was set but MTP ran (mtp=1.00 tok_step=1.95), so this is MTP K=2.
    • Trace: fnext_bench\claude-trace-request.txt, 27,699 launches.

    Per decode iteration (median of 19):

    • Main verify forward (2 rows): 1,071 launches, sum GPU 106.1 ms.
    • MTP draft: 42 launches, 4.3 ms.
    kernel (verify forward) GPU ms / step launches / step share
    dense_gemv_bf16_batch2 (grids 320 and 2048 × 256) 25.0 72 23.5%
    hc_pre_finish_x4 (grid 2×80 × 128) 13.8 97 13.0%
    hc_pre_down (grid 2×10 = 20 WGs × 1024, 40 KB LDS) 13.2 97 12.4%
    dense_gemv_bf16 (lm_head, grid 62020) 11.8 2 11.1%
    moe_expert_gate_up_shared_batch2_t 10.4 36 9.8%
    moe_expert_silu_down_shared_batch2_t 6.5 36 6.1%
    moe_expert_gate_up_shared_t + …silu_down_shared_t 7.7 48 7.2%
    hc_post + hc_pre_stage 4.8 205 4.5%
    gated_delta_rule_wy2 2.1 36 2.0%

    Median launch is 28.7 µs; 32% of launches are under 20 µs.

    Reading:

    • The hyper-connection (HC) kernels take about 30% of the step, against roughly 5% of the parameters. hc_pre_down puts 20 workgroups on a 40-CU part.
    • If production runs ~130 ms per iteration (~14 tok/s at tok_step ~1.9 in the Strix Halo Windows: Flash-Next port on main + MoE prefill transpose (2k TTFT ~2x) (supersedes #54) #80 replay, a different prompt class), most of that is GPU time rather than launch gaps. That makes the first targets kernel efficiency: HC, BF16 batch-2 GEMV, shared expert. Decode graphs look like the smaller lever.
    • Not yet determined: the untraced rate for this same request. Winbox plan n3's step X measures it (no-trace / trace / trace+SYNC on the same prompt).
  4. AzeezIsh commented on Oct 2, 2026

    @AzeezIsh
    ContributorAuthor

    Step 1 done: Flash-Next decode attribution (winbox, 2026-10-02)

    Setup: ATLAS_TRACE_LAUNCH=1 ATLAS_TRACE_LAUNCH_SYNC=1, landing binary 577F510D (tree 93a99cc094), serial, one 40-token greedy request, MTP on as served (tok_step=1.95). There are 27,699 launches in the window. Cycles are split at the LM-head launches.

    The step is GPU-bound, so decode graphs are not the lever here.

    • One MTP cycle (verify fwd at T=2, LM head, then draft) is 111 ms of summed GPU time across 1,119 launches. The unsynced wall cycle is ~105 ms (1.95 tok/step at ~17–18 tok/s).
    • Under SYNC the per-cycle host gaps are ~95 ms. Normally those are overlapped by the async queue, and GPU time ≈ wall says they are.
    • HIP graphs would remove launch cost that is already hidden. They remain worth having later for C>1 and for shorter steps, but they don't move C=1 today.

    Where the 111 ms goes:

    ms / cycle what note action
    25.0 dense_gemv_bf16_batch2 (GDN in-proj 16384×2560, out-proj) ~200 GB/s, at the BF16 ceiling Weights ship BF16 here (ATLAS_QWEN4EXP_BF16_GDN default). Halving needs lossy requant, so it's accuracy-gated and not a free win.
    27.1 hc_pre_down + hc_pre_finish_x4 (mHC collapse, 97×) ~94 GB/s; at T=2 each 6.55 MB weight is read once per token; grid 2×10 leaves half the CUs idle #154: token-fused, bit-identical; up to −21 ms if it reaches the ceiling
    11.7 LM head dense_gemv_bf16 ×2 (BF16 [248320,2560]) 216 GB/s per launch, but read twice for the two verify tokens #153: one-pass batch2 on HIP, bit-identical, −5.9 ms
    24.6 MoE batch2 gate_up/down (36 GDN layers) + per-token MoE (12 attn layers × 2) ~100–133 GB/s, about 55% of ceiling Next kernel target (~−9 ms possible). Batching the 12 attention layers' MoE saves ~2 ms more.
    ~22 everything else (GDN recurrence, conv, norms, attention, routing, hc_post/hc_pre_stage) each item small —

    Correction to my earlier note: I'd guessed the GDN projections were FP8-dequantized to BF16, which would have meant a byte-identical FP8 path. They're not. This checkpoint ships them as BF16, so that option doesn't exist.

    For your plan n3 X arm, @devin: this covers attribution. Only the trace-overhead measurement (no-trace vs trace) is left, if you still want it.

  5. AzeezIsh commented on Oct 27, 2026

    @AzeezIsh
    ContributorAuthor

    2026-10-27: where Gufo's Flash-Next decode lead comes from. This reads its source; nothing in this comment is a measurement on our side.

    Gufo (gufo-org/gufo @ bb5ab8dc) publishes Flash-Next Q4_K_XL numbers: AR 28.3 tok/s, MTP on mixed text 36–40 tok/s, C=8 MTP 127 tok/s (sum of rates). Its 116.9 tok/s README headline is repetitive text.

    Bytes per AR token (inferred):

    What not to redo: token-fused HC (#154) was bit-identical but slower on gfx1151 (closed 10-02). #154 also found that SYNC traces inflate small kernels (hc_pre_finish_x4 reads 143 µs traced vs 39 µs isolated), so the 111 ms attribution above probably overstates HC.

    Queued (framework f43): a GDN-byte A/B on the existing switches, all at MTP1:

    • BF16 (base);
    • ATLAS_QWEN4EXP_FP8_GDN=full (E4M3, 128×128 blocks; rel-L2 2.6% on synthetic weights);
    • ATLAS_QWEN4EXP_BF16_GDN=0 (NVFP4, 9.3%).

    Each arm gets Gufo-matched tg, greedy identity and logprob drift vs base. If fp8full wins on speed, f45 runs ST-995 on it against the same-build reference 84.12 / 81.47. Per the neutral-switch rule, it only matters if it wins and holds accuracy.

    Other Gufo techniques with a plausible fit: int8 dot-product GEMVs on Q8 weights; MoE expert dedup across verify rows (bit-identical); a reduced-vocabulary draft head (output-preserving, acceptance-gated). All are unmeasured here.

  6. AzeezIsh commented on Oct 27, 2026

    @AzeezIsh
    ContributorAuthor

    Batched decode on Flash-Next/gfx1151: why it doesn't scale, and one dead end, measured. Framework, 2026-10-27.

    Where the time goes (f50, SYNC launch trace, AR, b9ab4ed54). GPU time per generated token:

    C=1 C=4
    total 88.3 ms 40.8 ms
    BF16 GEMVs 27.4 ms < 4 ms
    HC 24 ms 6 ms
    routed + shared MoE (moe_expert_{gate_up,silu_down}_shared_t) 24.6 ms 22.9 ms
    • Every kernel amortizes across rows except the routed + shared MoE. It stays at 66.8 launches per token and becomes 56% of the C=4 step.
    • Cause: the mHC batched decode (qwen3_ssm/trait_decode_batched_hc.rs) tries ffn.try_forward_km, which is dense-only (layers/mod.rs). MoE then falls back to forward_batched's per-row loop.
    • The token-major MoE arm the generic decoder uses requires !use_t_layout_for_decode(), so it doesn't apply to the transposed Flash-Next tables either.
    • Steady C=8 aggregate is ~14.5 tok/s, against Gufo's AR C=8 of 125.

    Dead end: GB10's qwen4exp_moe_decode on HIP (f52). Ported locally (perf/hip-qwen4exp-moe-decode 750a18bfb: strix-hip symlink, HIP no-op for the PTX L2 prefetch, 64-bit warp masks, the !cfg!(atlas_hip) gate on ATLAS_QWEN4EXP_MOE_FAST dropped). It builds and is bit-identical: all probes identical, mean |Δlogprob| 0.00000, AR and MTP. But it isn't faster on gfx1151:

    FAST=0 FAST=1
    AR steady C1 / C4 / C8 12.2 / 14.5 / 14.5 12.5 / 15.0 / 14.9
    MTP1 C1 decode tg 18.7 16.1
    prefill d0 728 ~637
    10k first token 0.44 s 0.70 s

    Per the neutral-or-worse rule, the branch is parked, not proposed. The C>1 fix needs a MoE decode kernel shaped for gfx1151. Gufo's approach (its source; not measured here) is wave32 int8-dot GEMVs plus deduplicating identical experts across rows.

    Next lever being measured (f55): ATLAS_QSA_VERIFY_ACTIVE on gfx1151. It defaults to off on gfx1151 ("unmeasured there"), so MTP turns off past ~2k context (f41/f49 MTP rows at 8k and 32k ran at AR speed). Our ST-995 and agentic recipes already ran with it on, so its accuracy is covered.

  7. AzeezIsh commented on Oct 28, 2026

    @AzeezIsh
    ContributorAuthor

    ATLAS_QSA_VERIFY_ACTIVE=1 restores MTP past the QSA bound on gfx1151: +56% decode at 8k depth, +49% at 32k. Framework f55, merged main 8863dc5e5, Flash-Next NVFP4, ATLAS_HIP_MOE_GROUPED_MIN_TOKENS=64, Gufo-matched (greedy, thinking off, pp ≈ 1,860 new tokens, tg128).

    arm tg d0 tg d8k tg d32k steady C1 C4 C8
    AR 12.2 12.2 12.1 12.2 14.3 15.0
    MTP1, verify-active off (gfx1151 default) 18.6 12.1 12.1 14.9 14.2 14.9
    MTP1, verify-active on 18.6 18.9 18.0 19.0 14.2 14.9

    Mixed text. Repetitive text runs 18.9 / 18.9 at 8k / 32k.

    Reading:

    • With the default (off), MTP turns off once QSA selection activates past ~2k tokens ("mtp declined: qsa_active"), so long-context decode falls back to AR speed.
    • With it on, MTP holds ~18–19 tok/s out to 32k. That matches GB10's measured gain at the time NVIDIA's default flipped ([job] Qwen3.8-Flash-Next: decode speed — MTP past the QSA bound, draft-vocab slicing, decode graphs #70: +56% at 5.1k).
    • C>1 is unchanged. The multi-sequence guard refuses rows of several sequences, and the MoE non-amortization from f50 is still the C>1 limiter.

    Accuracy is already covered on gfx1151. Every Flash-Next ST-995 and agentic run on framework this week set =1:

    • f05 84.12/81.47;
    • f22 84.12/82.33;
    • f48 84.52/81.97;
    • agentic f47/f51/f53.

    The code comment "gfx1151 keeps default OFF (unmeasured there)" is out of date. The remaining step is a one-line default flip in verify_active_decision, which I'll prepare as a local branch.

  8. AzeezIsh commented on Oct 29, 2026

    @AzeezIsh
    ContributorAuthor

    27B NVFP4 decode on gfx1151 is at the weight-bandwidth ceiling (strix s95, main b5a8f6b15). Unserialized rocprofv3 kernel trace of a 1,840-token prompt followed by 256 decoded tokens (plain decode, MTP off, ignore_eos). Span 29.2 s, GPU busy 95.9%. The 4.1% idle is ~254k sub-10 µs launch gaps (1.06 s), so host overhead isn't the decode gap.

    kernel (whole window, prefill included) time launches ≈ per decoded token
    w4a16_gemv_dp4a (NVFP4 MLP) 11.80 s (42%) 48,960 = 192/token ~46 ms
    w8a16_gemv (FP8 GDN + attention projections) 8.16 s (29%) 40,800 = 160/token ~32 ms
    paged_decode_attn 1.34 s (4.8%) 4,080 ~5 ms
    GDN decode + norms + conv ~0.9 s ~3–4 ms

    Bandwidth (inference from the checkpoint shapes):

    • MLP: 64 layers × 3 × 17408 × 5120 ≈ 17.1 G NVFP4 params at ~4.5 bits ≈ 9.6 GB/token in ~46 ms ≈ 209 GB/s.
    • FP8 projections: ≈ 7.2 G params at 1 byte ≈ 7.2 GB/token in ~32 ms ≈ 225 GB/s.

    Both are at strix's measured ~220 GB/s ceiling. That means:

    • The GEMV kernels are not the decode lever. Total ≈ 17 GB/token caps plain decode near 13 tok/s.
    • What moves decode: (a) fewer bytes per token — the FP8 projections are 42% of the bytes at 1 B/param, against NVFP4's ~0.56; (b) more tokens per weight read — MTP / speculative acceptance (the default recipe runs MTP; s92 saw ≥ 14.3 tok/s at 8k).

    Next on decode: measure what an NVFP4 re-encoding of the FP8 projections costs in accuracy (ST-995), since it would cut 3 GB/token (+20% plain decode, estimated). In parallel, MTP acceptance at depth.

  9. AzeezIsh commented on Oct 29, 2026

    @AzeezIsh
    ContributorAuthor

    27B NVFP4 decode table, MTP vs plain (strix s96, main b5a8f6b15). Default serve-amd.sh recipe (MTP, 3 drafts) vs NUM_DRAFTS=0. 256 tokens with ignore_eos; decode tok/s = completion ÷ (wall − first-token time), 2 runs each. 0 faults.

    context MTP (3 drafts) plain MTP gain
    ~1.9k 18.7 / 17.5 tok/s 10.2 / 9.9 ~1.8×
    ~7.4k 16.7 / 15.8 8.8 / 8.8 ~1.85×
    ~14.4k 14.3 / 14.4 7.7 / 7.6 ~1.9×

    MTP acceptance (ATLAS_MTP_ACCEPT_DEBUG): p1 = 0.73–0.77, mean accepted ≈ 1.6–1.75 of 3, tokens per verify step ≈ 2.6. Plain decode drops with depth (10.2 → 7.7) as attention and KV reads add to the ~17 GB/token of weights (s95: the weight GEMVs already run at the ~220 GB/s ceiling).

    Next: a draft-count sweep (2/3/4/5) at 2k and 8k (s97). The other decode lever, fewer bytes per token via an NVFP4 re-encoding of the FP8 projections, needs an accuracy gate before it's worth building.

  10. AzeezIsh commented on Oct 29, 2026

    @AzeezIsh
    ContributorAuthor

    Flash-Next NVFP4 decode on main b5a8f6b15 (framework f83 / f84).

    f83 table: 256 tokens with ignore_eos, decode tok/s = completion ÷ (wall − first token), 2 runs each, 0 faults.

    context MTP (1 draft, the Flash-Next default) plain
    ~1.9k 19.2 / 21.1 tok/s 12.2 / 12.2
    ~7.4k 19.6 / 20.2 12.1 / 12.1
    ~14.4k 20.4 / 20.2 12.2 / 12.3

    Decode is flat with depth: QSA bounds the attention cost, unlike the 27B, which drops 10.2 → 7.7 plain over the same range. MTP is worth ~1.65× (p1 = 0.816).

    f84 attribution: unserialized rocprofv3, 256 plain-decode tokens after a 1.8k prompt. GPU 93.4% busy (1.5 s of small-gap idle in 23.3 s).

    kernel time share launches
    dense_gemv_bf16 6.94 s 31.9% 18,616
    hc_pre_down 3.12 s 14.3% 24,735
    moe_expert_gate_up_shared_t 2.92 s 13.4% 12,240
    hc_pre_finish_x4 2.66 s 12.2% 24,735
    moe_expert_silu_down_shared_t 1.50 s 6.9% 12,240
    gated_delta_rule_decode_f32 0.58 s 2.7% 9,180
    paged_decode_attn 0.36 s 1.6% 3,060

    Unlike the 27B, which is NVFP4/FP8 GEMV-bound at the bandwidth ceiling (s95), Flash-Next decode is dominated by BF16 dense GEMVs (32%) and hyper-connection work (26.5%, ~97 HC launches per token). Those are the decode levers here: fewer BF16 bytes (the BF16 dense projections are the ≥8.5 GB/token vs Gufo's ~6 GB noted earlier), and HC kernel efficiency. Next: map dense_gemv_bf16's launches to weights and price a lower-byte format for them.

  11. AzeezIsh commented on Oct 29, 2026

    @AzeezIsh
    ContributorAuthor

    [amd-campaign f86/s106 · 2026-10-29 12:10Z · framework (desktop Strix Halo) · main b5a8f6b · Flash-Next NVFP4 decode, 256 tok, MTP 1 draft]

    arm decode @1.9k decode @7.4k probes
    base 19.2 / 21.2 tok/s 19.6 / 20.2 —
    --lm-head-dtype fp8 20.4 / 21.9 20.0 / 20.9 short+code identical, 2k differs
    --lm-head-dtype nvfp4 illegal address (700) on first request — —
    ATLAS_QWEN4EXP_FP8_GDN=1 load fails: quantize_bf16_to_fp8_blockscaled not built for strix-hip — —

    Follow-ups:

    • fp8 lm_head: +3.5–6%, changes numerics → accuracy gate f89 queued (ppl dense/above-bound + 12 needles).
    • FP8 GDN: branch perf/hip-fp8-gdn-quantizer adds the portable quantizer to strix-hip (compiles for gfx1151); A/B f88 queued.
    • nvfp4 lm_head on gfx1151 is a crash bug (not investigated yet).
    • HC kernels (26.5% of decode, f84): strix-hip lacked the vectorized ATLAS_QWEN4EXP_HC_FAST kernels, so the env silently fell back. Port on perf/hip-hc-fast-port; A/B f87 (framework) + s107 (strix) queued. Grid-shape retune of scalar hc_pre_down (s106, strix): no shape beats production by >4%, dropped.
  12. AzeezIsh commented on Oct 29, 2026

    @AzeezIsh
    ContributorAuthor

    [amd-campaign f87/f88 · 2026-10-29 12:30Z · framework · Flash-Next NVFP4 decode, 256 tok, 1-draft MTP / plain]

    • f88 FP8 GDN (perf/hip-fp8-gdn-quantizer, ATLAS_QWEN4EXP_FP8_GDN=1 ATLAS_GDN_FP8_DECODE=1): MTP 19.2/21.2 → 23.2/23.9 tok/s @1.9k, 19.6/20.3 → 22.0/23.1 @7.4k (+12..21%); plain 12.2 → 14.3 (+17%). Probes short + 2k differ (FP8 weights; numerics change) → accuracy gate f91 queued (ppl dense + above-bound + 12 needles). Merges as a default for Flash-Next on gfx1151 only if the gate passes.
    • f87 HC_FAST port (perf/hip-hc-fast-port): neutral (MTP 19.2→19.2 @1.9k, plain 12.2→12.2), probes identical. Per the neutral rule it does not merge; branch kept for reference. Inference (unverified): at T=1 the scalar path already sits near what these launches can draw in-context, so the 26.5% HC share is not a kernel-shape problem.
    • Flash-Next does not fit on strix (OOM pre-flight: 91 GB peak vs 55.9 GB free), so its decode A/Bs are framework-only.
  13. AzeezIsh commented on Oct 30, 2026

    @AzeezIsh
    ContributorAuthor

    [amd-campaign f92/f93 · 2026-10-29 23:20Z · framework · Flash-Next NVFP4 FP8 GDN decode] agentic-webserver 50 runs, prefix cache ON, MTP 1 draft, chunk 2048, perf/hip-fp8-gdn-quantizer 624b11c build: default 48/50 (TTFT med 3404 ms) vs ATLAS_QWEN4EXP_FP8_GDN=1 ATLAS_GDN_FP8_DECODE=1 47/50 (TTFT med 3408 ms); one failure each, on different runs. With f88's +12..21% decode and f91's ppl/needles pass: PR #262 makes the opt-in work on gfx1151 (defaults unchanged). A default flip needs a larger agentic sample.

  14. AzeezIsh commented on Oct 30, 2026

    @AzeezIsh
    ContributorAuthor

    [amd-campaign f103/f107 · 2026-10-30 10:30Z · framework · Flash-Next]

  15. AzeezIsh commented on Oct 30, 2026

    @AzeezIsh
    ContributorAuthor

    [amd-campaign f114 · 2026-10-30 16:30Z · framework · Flash-Next · memory tradeoff of #275, FP8 GDN default] At MAX_BATCH 8 + SSM 8 (raised to 10 for Marconi), pre-KV commit rose from 89.2 GB (f110, main 1585c38) to 91.1 GB (f114, with #275), leaving 0.1 GB / 203 blocks of KV (2.0 GB / 5,416 before) on the 96 GB GPU at util 0.95. C4/C8 requests then serialize (max TTFT 85 s / 195 s; aggregate = C1). The serve-amd default (MAX_BATCH 1) is unaffected (post-merge f112 OK). So the FP8 decode copy (+~1.9 GB on top of the BF16 kept for prefill) is a single-user win and a concurrency-capacity loss on Flash-Next. Options: make the default conditional on headroom (e.g. off when max_batch > 1), or free BF16 by using FP8 for prefill too (=full needs w8a16_gemm_pipelined, expected-absent on strix-hip). Until then, C>1 setups should pass ATLAS_QWEN4EXP_FP8_GDN=0. Also f114: verify-row MoE dedup (perf/hip-moe-t-rows) is IDENTICAL and neutral at C1 MTP (26.4 = 26.4 tok/s); its C>1 effect is re-measured with FP8 GDN off in f115.

  16. AzeezIsh commented on Oct 31, 2026

    @AzeezIsh
    ContributorAuthor

    [amd-campaign · 2026-10-31 21:35Z · framework f159 · main 385d465] ATLAS_QWEN4EXP_BATCH_SMALL=1 measured neutral on gfx1151 twice (f130, f159: C8 38.25 vs 38.3). It never engaged: qwen4exp_decode_fuse::qwen4exp_gdn_decode_fused_rows fails its kernel lookup on strix-hip. qwen4exp_decode_fuse.cu is not built for that target, because it relies on thread-block clusters (__cluster_dims__(QDF_REPEAT), cg::this_cluster().sync()), which gfx1151 has no equivalent for. So the per-row GDN chain still runs per row (f154: gated_delta_rule_decode_f32 73,476 launches, 7.4% of C8), and ATLAS_QWEN4EXP_DECODE_FUSE (C1) is likewise unavailable there. Port plan: each 3-block cluster → one 3 × QDF_D-thread block. Sizing it with a C1 decode profile (f157) first.

  17. AzeezIsh commented on Nov 4, 2026

    @AzeezIsh
    ContributorAuthor

    27B 8-user decode attribution, strix s210 (main 2f9c370, nvidia/Qwen3.8-27B-NVFP4, MAX_BATCH 8, rocprofv3; 8 concurrent requests, each with 1,024 completion tokens verified; 244 s window, GPU busy 92.7%).

    One decode step (8 tokens) takes about 221 ms, so roughly 36 tok/s total:

    kernel ms/step share note
    w8a16_gemv_batch8_dyn_vl2_n2 78 35% FP8 attention/GDN projections, ~9 GB → ~115 GB/s
    w4a16_gemv_dp4a_dual_batch8_d4_dyn_vl2 67 30% MLP gate+up NVFP4, ~6.4 GB → ~95 GB/s
    w4a16_gemv_dp4a_batch8_d4 25 11% MLP down, ~128 GB/s
    w4a16_gemv_batch8 12.7 6% lm_head (inference)
    GDN decode chain (gdr_decode + conv + ba_gates + rms) ~20 ~9% launched per sequence: 48 layers × 8
    idle gaps under 10 µs ~16 7% ~2,770 kernel launches per step
    • Inference: about 19 GB of weights are read per step. At ~215 GB/s that puts the floor near 90 ms/step, about 89 tok/s at C8.
    • The two levers are the bandwidth of the batch-8 GEMVs (95–130 GB/s) and batching the GDN decode across sequences.
    • Next: --ssm-batched-recurrent is opt-in and off by default. Queued A/B: strix s212, with a greedy output probe on each arm.
  18. AzeezIsh commented on Nov 4, 2026

    @AzeezIsh
    ContributorAuthor

    Merged #326, main a523a07: 27B 8-user decode +13.1%. Bit-identical; framework, nvidia/Qwen3.8-27B-NVFP4, MAX_BATCH 8, two rounds each.

    main #326
    C8 52.2 / 51.7 tok/s 58.7 / 59.0
    C4 44.1 / 44.0 48.9 / 49.0
    C1 19.9 19.9

    Changes, against the s210 step profile:

    • w8a16 n2: both weight halves are now in flight at once, +10–18% at kernel level.
    • gate+up: runs as two single-matrix launches instead of the vl2 dual, 131 → 178 GB/s.

    From the same kbench loop, these did not help and were reverted:

    • integer FP8 decode and prefetch
    • 4 outputs per thread
    • launch-bounds tuning, for both w8a16 and the lm_head
    • 8-output blocks for small N
    • down-proj unroll (that kernel is already at 187 GB/s)
    • splitting the m≤4 dual (already at ~215 GB/s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    job

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions