Skip to content

serve-amd.sh: keep Flash-Next's GDN projections BF16 above MAX_BATCH 1 (restores C>1 KV room after #275) - #277

Merged
AzeezIsh merged 1 commit into
mainfrom
fix/serve-amd-fp8gdn-batch
Oct 30, 2026
Merged

AzeezIsh merged 1 commit into
mainfrom
fix/serve-amd-fp8gdn-batch

Conversation

@AzeezIsh

Copy link
Copy Markdown
Contributor

#275 made the FP8 GDN decode copy the gfx1151 default: +17% single-user decode, but ~1.9 GB on top of the BF16 projections kept for prefill. At MAX_BATCH=8 that left 0.1 GB of KV (203 blocks) on the 96 GB framework GPU, and C4/C8 requests ran one at a time (f114: max TTFT 85 s / 195 s).

The recipe now defaults ATLAS_QWEN4EXP_FP8_GDN=0 when MAX_BATCH > 1. An explicit setting wins, and the recipe default (MAX_BATCH=1) keeps the FP8 copy. The variable is read only by qwen4_exp.

Verified (framework f117, main-276 binary with this recipe):

GDN projections KV result
MAX_BATCH=8 BF16 5,416 blocks / 2.0 GB C4 / C8 overlap: max TTFT 9.3 / 18.1 s; aggregate 15.4 / 15.1 tok/s
MAX_BATCH=1 BF16 + FP8 decode copy 21,562 blocks / 7.9 GB C1 tg 15.2 tok/s, pp 1036 tok/s

Shell-only change to the AMD serve recipe.

🤖 Generated with Claude Code

#275 made the FP8 GDN decode copy the gfx1151 default: +17% single-user
decode, but ~1.9 GB on top of the BF16 projections prefill keeps. At
MAX_BATCH 8 (SSM slots raised to 10 for Marconi) that took pre-KV from
89.2 to 91.1 GB of a 91.2 GB budget on the 96 GB framework GPU. 0.1 GB
of KV (203 blocks) was left, and C4/C8 requests ran one at a time: max
TTFT 85 s / 195 s, aggregate equal to C1 (f114 vs f110).

Above MAX_BATCH 1 the recipe now defaults ATLAS_QWEN4EXP_FP8_GDN=0. An
explicit setting still wins, and MAX_BATCH 1 (the recipe default) keeps
the FP8 copy. The variable is read only by qwen4_exp, so other models
are unaffected.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@AzeezIsh
AzeezIsh merged commit 48f73b2 into main Oct 30, 2026
23 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant