Repository navigation
qwen35 cuda: opt-in grouped same-input projections keeping each split-K - #4515
Conversation
|
One GB10 A/B (Qwen3.8-27B NVFP4 with DFlash2, base = this PR with the switch off, new =
So on a GB10 this is exact but not a win. The change was aimed at GPUs with many more SMs (sm_120), where grouping fills the device better; it stays open and out of trains until it is measured on such a GPU.
|
|
Correction to my A/B note above: the checkpoint was Qwen3.8-27B MLX 4-bit with its DFlash2 drafter, not NVFP4. The numbers and the reading stand as posted; they say nothing yet about the NVFP4 checkpoint.
|
bbab639 to
7b265b8
Compare
|
sm_120 device check for
Run under idle-guard on the lab queue (ticket The served half of the still-to (one-stream A-B-B-A on a ModelOpt Qwen3.8-27B) needs the 27B checkpoint, which does not fit this 16 GB card - leaving that arm to whoever has the bigger box. |
7b265b8 to
f9a216d
Compare
…ction's split-K TF_Q35_GROUP_PROJ=1 (default off) runs a ModelOpt checkpoint's same-input decode projections as one qmmf launch: MLP gate and up, GDN in_proj_qkv and in_proj_z, in_proj_a and in_proj_b, attention q, k and v. Each block is one tile and K slice of one projection in that projection's own 16-row instance body, so its slices, order and cluster sum are those of its own launch. Clusters are as wide as the widest split and never span two projections. Pre-sm_90 GPUs, fused or prompt tiles and wider windows keep today's launches.
…wn launch Rows 1-16, the served Qwen3.8-27B groups plus padding, odd widths and four projections, adversarial weights, inputs and tensor scales; warm times at 1 and 16 rows.
Pin the reviewed grouped CUDA sources and shorten the new loader comment. Preplan compatible projection runs before launching so mixed FP8/BF16 GDN uses two groups and every fallback remains four separate launches.
f9a216d to
1779ea2
Compare
What this changes
Every served Qwen3.8-27B ModelOpt projection (NVFP4, FP8, BF16) decodes in its own qmmf launch with its own split-K. With
TF_Q35_GROUP_PROJ=1, projections that read the same input run as segments of one launch; a segment keeps its own split-K and K-slice order, so its outputs are byte-identical to its separate launch. This cuts launches per decode round, which matters most on GPUs with many SMs (a review estimated +5% to +11% on sm_120).Checks
tf-cuda-test group-projcompares each grouped projection's bytes with its own launch (rows 1 to 16, served groups, odd widths, adversarial values). fmt, ast-check, lean, 600-line cap.Still to run
Compile and run
group-projon sm_121 and sm_120, then one-stream served A-B-B-A with tokens compared.