Archived
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:
1 parent
bfb1ebd1dd
commit
175f0bbd33
8 files changed
+160
-15
No files matched your search
@@ -31,6 +31,7 @@ struct RadMtpCoupleProposeCall {
|
||||
int64_t vocab;
|
||||
int64_t ld_idx, ld_val, ld_draw, st_round, st_row;
|
||||
int round;
|
||||
float q_temp = 1.0f; /* Q = softmax(val / q_temp); 1: the scores' own law */
|
||||
};
|
||||
|
||||
/* The verify's operands: the sampler's own candidate plane, its parameter rows, the bound state
|
||||
@@ -100,8 +101,13 @@ static inline RAD_SPECHUB_HD void rad_mtp_couple_propose_row(const RadMtpCoupleP
|
||||
for (int i = 0; i < 8; ++i) s.ids[i] = -1;
|
||||
if (s.draw.mode == 1) {
|
||||
s.status = -1;
|
||||
if (s.draw.card == c.card[row] &&
|
||||
rad_mtp_couple_build_q(idx, c.val + row * c.ld_val, c.vocab, &s)) {
|
||||
const float* v = c.val + row * c.ld_val;
|
||||
float vt[8];
|
||||
if (c.q_temp != 1.0f) {
|
||||
for (int i = 0; i < 8; ++i) vt[i] = v[i] / c.q_temp;
|
||||
v = vt;
|
||||
}
|
||||
if (s.draw.card == c.card[row] && rad_mtp_couple_build_q(idx, v, c.vocab, &s)) {
|
||||
const double u = rad_spechub_uniform(s.draw.seed, s.draw.base,
|
||||
RAD_MTP_COUPLE_KEY_DRAFT + (uint64_t)c.round);
|
||||
s.x = s.ids[rad_mtp_couple_pick(s, u)];
|
||||
|
||||
Reference in new issue
Block a user