Conversation
Compact Qwen3.8 TP4 C2-C8 routed rows into active-expert TurboMind groups for both AWQ MoE stages. Keep C1 and unsupported contracts on the existing paths, with an explicit rollback control and warmup coverage. Co-authored-by: OpenAI Codex <codex@openai.com> Signed-off-by: Leonccaa <166551845+Leonccaa@users.noreply.github.com>
|
Closing this for now after reviewing the implementation cost against the measured endpoint benefit. The optimization is valid and both independent A/Bs confirm the direction, but the production-code surface is relatively large (new CUDA/Torch ops, ABI bindings, warmup, and runtime dispatch) for the isolated pure-decode gain:
On the historical matrix metric that includes mixed prefill/decode waiting, the corresponding gains are only The branch, exact-patch evidence, tests, rollback contract, and profiling artifacts are being retained. This can be reconsidered if the implementation can reuse existing metadata/operator surfaces more substantially, or if further profiling identifies a materially larger end-to-end opportunity. Thanks to everyone reviewing the approach. This closure is a cost/maintenance decision, not a correctness failure. |
Purpose
On the post-#477 SM70 AWQ path, Qwen3.8 C2-C8 decode still schedules the 512-expert dense grouped route even though each step has only 20-80 routed rows. This PR compacts the already-sorted routed rows into contiguous active-expert segments and uses those segments for both AWQ MoE W13 and W2.
The optimized route is intentionally narrow: Qwen3.8, TP4, AWQ W4A16 group-size 32, E512/K10, hidden size 2560, local intermediate size 160, and C2-C8. C1 and unsupported contracts retain the existing path.
VLLM_SM70_AWQ_QWEN38_MOE_COMPACT_GROUPED_DECODE=0is the rollback switch; an explicit=1fails closed if the loaded extension lacks the required ops.This aligns AWQ with the active-group execution behavior used by the adjacent SM70 NVFP4/MXFP4 paths; it does not attempt to align quantization formats or numerical behavior. A repository PR/issue search found no existing AWQ grouped-decode implementation with the same scope. In particular, draft #476 covers NVFP4 DFlash2 attention/speculative-decode concurrency rather than AWQ MoE active-expert dispatch, so it is complementary rather than duplicate work.
AI assistance: OpenAI Codex assisted with implementation, analysis, and test orchestration. Leon reviewed every changed line and the evidence below before submission.
Test Plan
_Cextension from this single commit in an isolated CUDA container.vllmand_C.abi3.sofrom the clean commit snapshot.ee4e5db9bc20bf9ec9cbcdf2414ead5c6e5dab57) on top of pending [Bugfix][SM70] Enable Qwen3.8 AWQ in dual-compile lane #487, then run one frozen-prompt cell each for C4x64K and C8x16K on 4x V100 PCIe 32 GB: TP4, AWQ g32, FP16 activations/KV, MTP0, prefix cache off,FULL_AND_PIECEWISE,max_num_batched_tokens=8192, output 320,ignore_eos=false. The matched baseline is the same [Bugfix][SM70] Enable Qwen3.8 AWQ in dual-compile lane #487 stack without this patch; neither arm includes [Perf][SM70] Add indexed-A AWQ prefill for Qwen3.8 #464/perf(sm70): right-size AWQ MoE persistent scratch #465/[Perf][SM70] Bound Qwen3.8 AWQ W2 output scratch #470/[Perf][SM70] Compact Qwen3.8 AWQ scale metadata #473.Test Result
2.44140625e-4, max nonzero ULP 22.1.220703125e-4, max nonzero ULP 2.4, and normal Chinese prose; every sampled logprob was finite. Logs confirmed C8/C4/C3/C2 grouped-route hits and contained no traceback, OOM, or CUDA error.The exact-patch matched prefill/E2E changes were small: C4 prefill throughput -0.19%, TTFT +1.22%, wall -0.72%; C8 prefill throughput +0.68%, TTFT -1.14%, wall -1.76%. Mixed-phase ITL changed -1.45% for C4 and +10.91% for C8; this sparse mixed interval is scheduler-sensitive and is not used to attribute the MoE change. All 12 timed requests completed 320 output tokens with
finish_reason=length.The four-PR integration repeat independently confirmed the direction: C4 pure decode
107.845 -> 117.844 tok/s(+9.27%, ITL -8.49%) and C8199.993 -> 213.113 tok/s(+6.56%, ITL -6.16%). Its 12 requests also completed all 320 output tokens.The full regression matrix completed all nine runnable cells; C4x128K, C8x64K, and C8x128K were expected capacity skips. Every runnable request completed 256 output tokens with
finish_reason=length, all warmup and scored stderr files were empty, and logs confirmed C2/C4/C8 grouped-route hits. A structured audit found no contract or result errors.The matrix client's aggregate decode metric includes time spent waiting behind overlapping prefills, unlike the pure-decode table above. On that historical metric, the two long-concurrency cells were:
That historical comparison is a regression check across the accumulated post-#477 stack, not a grouped-decode-only attribution. The exact-patch pure-decode A/B above isolates this PR. The remaining mixed prefill/decode scheduling stall is outside this PR.
The source change has no direct dependency on #487: commit
41f0a8fbuilds and its operator gate passes on cleanmain. The real AWQ endpoint evidence applies that exact patch on top of #487 because post-#477mainstill needs the pending LM-only admission and late PLE-IPC initialization fix to start this checkpoint through the intended dual-compile route. The endpoint validation commit50efff1and PR commit41f0a8fhave the same stable patch ID.C8x64K is not claimed: 524,288 prompt tokens exceed the measured 505,574-token FP16 KV capacity before output tokens are included.
Essential Elements of an Effective PR Description Checklist