MTP coupling on qwen35_fp8's 2-bit draft head; libxe2 rows for the coupling ops

- arch: under --draft-coupling the MtpBlockFP8 draft head keeps the 2-bit logits' top 8,
  rescores them against the trunk's head (logit_rerank) and runs one mtp_couple_propose a
  round, as the Flash-Next head does; qwen35_fp8 declares the draw/state planes and a
  pitch-8 proposal. Off, nothing changes.
- libxe2: device rows for mtp_couple_propose / mtp_couple_verify, a work-item a row over
  spechub's own row helpers and argument readers (built into xe2_couple.cpp).
- spechub: mtp_couple_propose takes an optional q_temp (Q = softmax(score / q_temp)); exact at
  any value. RADIANCE_MTP_Q_TEMP sets it on qwen35_fp8 (default 1: 1.0 > 0.7 > 0.5 here).

w4a16-rtn-mtp4, depth 7 adaptive, temperature 0.7: decode proxy 76.9 -> 78.8 tok/s,
BetterBench decode 80.5 -> 81.7; greedy 8/8 identical with coupling on. Host tests
(spechub|couple|abi|mtp) 7/7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
claudeandClaude Opus 5.5 committed 2026-11-02 05:45:50 +01:00
1 parent bfb1ebd1dd
commit 175f0bbd33
8 files changed
+160 -15

No files matched your search

+13
View File
@@ -86,6 +86,19 @@ const RadKernelInfo kKernels[] = {
.shape = "any n; bf16 rows wider than 512, 8-aligned, in one pass, else the pair",
.dtypes = "float x, a, gain and y (bf16 in the recipes), f32 arithmetic",
.domain = RAD_DOMAIN_DEVICE, .launch = xe2::add_rmsnorm },
{ .name = "xe2_mtp_couple_propose", .op = "mtp_couple_propose", .family = "draft",
.computes = "x~Q over the final top8, FP64 T1 softmax: spechub's row helper, a work-item a row",
.shape = "M,n_vocab,round,max_rounds<=8",
.dtypes = "f32,i32,u32",
.domain = RAD_DOMAIN_DEVICE, .launch = xe2::mtp_couple_propose,
.opd_shape = rad_mtp_couple_propose_shape },
{ .name = "xe2_mtp_couple_verify", .op = "mtp_couple_verify", .family = "draft",
.computes = "maximal coupling over the surviving target candidates, FP64 P: spechub's row "
"helper, a work-item a row",
.shape = "M,n_cand,n_vocab",
.dtypes = "f32,i32,u32",
.domain = RAD_DOMAIN_DEVICE, .launch = xe2::mtp_couple_verify,
.opd_shape = rad_mtp_couple_verify_shape },
{ .name = "xe2_rmsnorm_quant_fp8", .op = "rmsnorm_quant_fp8", .family = "norm",
.computes = "residual add (optional), RMS norm, bf16 narrowing, E4M3 codes and an f32 scale "
"per group; int8 codes at amax/127 for an int8 q",