Repository navigation
serve-amd.sh: qwen4_exp exact batching lane on above MAX_BATCH 1 (Flash-Next C4 +59%, C8 +85%) - #289
Merged
Merged
Conversation
…sh-Next C4 +59..68%, C8 +82..85%) ATLAS_QWEN4EXP_BATCH_FAST is what batches a Qwen3.8-Flash-Next multi-sequence decode step on gfx1151. Without it, the mHC multi-seq paths run the MoE a row at a time (framework f113). Framework, main build: - f128, AR: C4 15.3 -> 24.3, C8 15.1 -> 27.9 tok/s; C1 12.8 unchanged - f132, MTP 1 draft: C4 15.2 -> 25.6, C8 15.0 -> 27.3 tok/s; solo-vs-C8 identity 7/8 vs 5/8 The lane also takes over the single-sequence MTP verify, which costs a lone request ~15% (f132: C1 MTP 20.6 -> 17.5 tok/s). So the recipe turns it on only above MAX_BATCH 1, next to the FP8 GDN rule, and the code default stays off. Explicit values win. The t_rows dedup kernels stay gated off on hip: un-gated, the lane faults at C4 (f127). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recipe-only. When
MAX_BATCH > 1,serve-amd.shnow defaultsATLAS_QWEN4EXP_BATCH_FAST=1, next to the existing FP8 GDN rule. Explicit values win, and the code default stays off.Why: on gfx1151 this lane is what batches a Qwen3.8-Flash-Next multi-sequence decode step. Without it, the mHC multi-seq paths run the MoE one row at a time: framework f113 counted 97,920 MoE gate_up launches for 2,040 tokens × 48 layers at C=8.
Measured (framework, main build, Gufo protocol):
The C1 MTP cost (the lane takes over the single-sequence verify) is why this is gated on
MAX_BATCH > 1rather than set as a code default;MAX_BATCH=1serving is untouched. The lane is the documented exact path ("every row of a batched multi-sequence step runs single-sequence decode's arithmetic"). The_t_rowsdedup kernels stay gated off on hip: un-gated, the lane faults at C4 (f127).BATCH_SMALLon top measured neutral (f130).🤖 Generated with Claude Code