AnonimousA commited on
Commit
0d79102
Β·
verified Β·
1 Parent(s): bbcebb1

Correct the 2026-08-31 throughput correction; add Unsloth MTP recipe; withdraw the routing-mass claim

Browse files
Files changed (1) hide show
  1. README.md +129 -1
README.md CHANGED
@@ -20,7 +20,15 @@ The successor to [REAP-256 "duo"](https://huggingface.co/AnonimousA/Qwen3.8-Flas
20
  ## Why K=320 and why multi-domain
21
 
22
  - **K=320 sits above the reliability knee.** Two independent measurements (sh0wie's REAP ladder, and our own K=256 lineage) show rare-token reliability and clean termination degrading below ~K=288-320. At K=320: zero empty-content stalls and zero truncation across all our battery passes, 9/10 on the seeded rare-name probe.
23
- - **Calibration is the product.** Salience was measured with `llama-imatrix` over a 525K-token corpus: 30% agentic / 30% code / 15% conversation / 12.5% math / 12.5% writing. Against our real multi-domain traffic, this selection retains 82.7% of routing mass vs 75.3% for a code-only selection at the same K. The multi-domain build beat the code-only specialist **even at code** (HumanEval 96.3% vs 95.7%).
 
 
 
 
 
 
 
 
24
 
25
  ## Measured (all on RTX 5090 32 GB, llama.cpp + expert-cache PR #27861 build)
26
 
@@ -76,11 +84,54 @@ llama-server -m Q2/Qwen3.8-Flash-Next-UD-Q2_K_XL-reap320-00001-of-00002.gguf \
76
  --temp 1.0 --top-p 0.95 --top-k 20 --min-p 0.0
77
  ```
78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  ## Traps (measured, not theoretical)
80
 
81
  1. `--parallel > 1` requires `--kv-unified`.
82
  2. Empty `content` with tight `max_tokens`: reasoning burns the budget. Detect and retry with a higher cap.
83
  3. First requests after a cold load pay disk; throughput climbs over ~3-4 requests to its warm ceiling.
 
 
84
 
85
  ## Credits
86
 
@@ -198,3 +249,80 @@ experts store knowledge, bits store precision β€” is not a throughput claim and
198
  the corrected numbers do not change that advice.** That build fabricates 0% where this one
199
  fabricates 25%. Take this one when fit and speed in constrained VRAM dominate; take theirs when
200
  you want general knowledge.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  ## Why K=320 and why multi-domain
21
 
22
  - **K=320 sits above the reliability knee.** Two independent measurements (sh0wie's REAP ladder, and our own K=256 lineage) show rare-token reliability and clean termination degrading below ~K=288-320. At K=320: zero empty-content stalls and zero truncation across all our battery passes, 9/10 on the seeded rare-name probe.
23
+ - **Calibration is the product.** Salience was measured with `llama-imatrix` over a 525K-token corpus: 30% agentic / 30% code / 15% conversation / 12.5% math / 12.5% writing. The multi-domain build beat the code-only specialist **even at code** (HumanEval 96.3% vs 95.7%), and we have since reproduced the effect at K=256, where changing *only* the corpus moved HumanEval from 89.6% to 95.1% at identical size and identical bits.
24
+
25
+ > **Correction (2026-09-01).** An earlier version of this card claimed this selection "retains 82.7% of routing mass vs 75.3% for a code-only selection at the same K." That number is withdrawn. It was measured against a corpus drawn from the same mixture that produced this selection, and the metric turns out to be circular β€” **each selection wins when scored against the corpus that produced it.** We then ran it as a genuine prediction on a K=256 rebuild: retained routing mass said the new selection would be *worse* (82.7% vs 78.0% for the incumbent), and every behavioural probe said the opposite, decisively. Retained routing mass is useful for understanding a prune; it does not rank two prunes. The HumanEval, rare-name and fabrication numbers below are unaffected β€” those are measured on the model, not on the selection.
26
+
27
+ > ⚠️ **Throughput figures in the tables below are superseded.** They have been corrected
28
+ > twice β€” once for a protocol error and once for a bug in the correction itself. Read
29
+ > [Corrections to this repository](#corrections-to-this-repository) at the bottom before
30
+ > citing any tok/s number from this card. Quality figures (HumanEval, rare-name,
31
+ > fabrication) are unaffected throughout.
32
 
33
  ## Measured (all on RTX 5090 32 GB, llama.cpp + expert-cache PR #27861 build)
34
 
 
84
  --temp 1.0 --top-p 0.95 --top-k 20 --min-p 0.0
85
  ```
86
 
87
+ ## New: run the Q2 with Unsloth's MTP head (+32% decode, costs 3.2 GiB)
88
+
89
+ Unsloth published standalone MTP heads for Qwen3.8-Flash-Next on 2026-09-01. They work on
90
+ this pruned Q2 build β€” the head is not affected by expert pruning β€” and are the single
91
+ biggest speed lever we have found for it. Measured on the same 32 GB card, same GGUF,
92
+ same flags, paired:
93
+
94
+ | `--n-cpu-moe 8`, `-c 65536`, KV `q4_0` | VRAM | decode |
95
+ |---|---|---|
96
+ | no speculation | 28104 MiB (86.2%) | 73.6 tok/s |
97
+ | **`--spec-type draft-mtp`** | 31276 MiB (95.9%) | **97.5 tok/s** |
98
+
99
+ Draft acceptance is 76–81% (mean accepted length 2.5–2.6). Quality is preserved:
100
+ HumanEval-164 94.5% with MTP vs 95.1% without β€” Unsloth's verification is exact, and the
101
+ one-problem gap is sampling noise.
102
+
103
+ ```bash
104
+ # Needs Unsloth's build, NOT mainline (see trap 4 below)
105
+ llama-server -m Q2/Qwen3.8-Flash-Next-UD-Q2_K_XL-reap320-00001-of-00002.gguf \
106
+ -md mtp-Qwen3.8-Flash-Next-shared-Q8_0.gguf \
107
+ --spec-type draft-mtp --spec-draft-n-max 2 \
108
+ -ngl 99 --n-cpu-moe 8 -c 65536 -fa on --jinja --parallel 1 \
109
+ --cache-type-k q4_0 --cache-type-v q4_0 \
110
+ --temp 1.0 --top-p 0.95 --top-k 20 --min-p 0.0
111
+ ```
112
+
113
+ The head costs **~3.2 GiB of VRAM, flat** β€” the same at every offload level we tried
114
+ (`--n-cpu-moe` 14 / 12 / 10 / 8), so budget for it once. On a 32 GB card at 96k context,
115
+ `--n-cpu-moe 10` is the balanced point (30578 MiB, 93.8%, 92.5 tok/s); `8` is the fast one
116
+ but leaves under 1 GiB free.
117
+
118
+ > **A note on how we measured this, because we got it wrong first.** Our initial harness
119
+ > reported 369 tok/s for this configuration β€” a 3.6Γ— speedup. It was wrong. It timestamped
120
+ > only stream chunks carrying `content`, while this model emits its reasoning in
121
+ > `reasoning_content`; that time landed in "time to first token" while its tokens stayed in
122
+ > the numerator. The inflation scales with how much the model reasons, so it was invisible
123
+ > on a short prompt and enormous on a long one. The +32% above is wall-clock, cross-checked
124
+ > against the server's own `predicted_per_second`. **If you benchmark a reasoning model,
125
+ > make sure your timer sees the reasoning stream** β€” and require two independent clocks to
126
+ > agree before you believe a number.
127
+
128
  ## Traps (measured, not theoretical)
129
 
130
  1. `--parallel > 1` requires `--kv-unified`.
131
  2. Empty `content` with tight `max_tokens`: reasoning burns the budget. Detect and retry with a higher cap.
132
  3. First requests after a cold load pay disk; throughput climbs over ~3-4 requests to its warm ceiling.
133
+ 4. **`--spec-type draft-mtp` exists in llama.cpp mainline but does not work here.** Mainline has the flag and not the MTP graph for `qwen4exp`, nor the tensor borrowing the *shared* heads need; it fails with `model doesn't contain MTP layers`. Use Unsloth's build.
134
+ 5. `"reasoning_effort": "none"` returns **HTTP 500** β€” the chat template accepts only `xhigh` / `medium` / `low`.
135
 
136
  ## Credits
137
 
 
249
  the corrected numbers do not change that advice.** That build fabricates 0% where this one
250
  fabricates 25%. Take this one when fit and speed in constrained VRAM dominate; take theirs when
251
  you want general knowledge.
252
+
253
+ ---
254
+
255
+ **2026-09-01 β€” the correction above was itself measured wrong. The throughput numbers in
256
+ it are inflated; the advice it gives about `predicted_per_second` is backwards. The
257
+ `--n-cpu-moe 0` collapse it documents is real and stands.**
258
+
259
+ ### The bug in our corrected harness
260
+
261
+ The 2026-08-31 protocol streams the response and measures the interval between the first
262
+ and last token. It timestamps a chunk only when that chunk carries `content`:
263
+
264
+ ```python
265
+ delta = (ch.get("delta") or {}).get("content")
266
+ if delta:
267
+ if first_at is None: first_at = now
268
+ last_at = now
269
+ ...
270
+ ct = usage["completion_tokens"] # ALL tokens, reasoning included
271
+ decode_tps = (ct - 1) / (last_at - first_at) # window of content only
272
+ ```
273
+
274
+ This model emits its chain of thought in **`reasoning_content`**, a different field of the
275
+ delta. Those chunks are never timestamped, so the entire reasoning phase falls inside what
276
+ the harness calls "time to first token" β€” while its tokens remain in the numerator. The
277
+ numerator counts reasoning; the denominator excludes the time that produced it.
278
+
279
+ **The inflation scales with how much the model reasons**, which is why it was invisible to
280
+ us: our prose prompt reasons briefly and our code prompt reasons at length, and we read the
281
+ resulting gap as a code-versus-prose effect. It was not. It was the same server.
282
+
283
+ For the row this build is actually served at β€” `--n-cpu-moe 4`, 98,304 context, code prompt
284
+ β€” we published **126.95 tok/s**. Measured by wall clock: **85.0 tok/s**.
285
+
286
+ ### And so: `predicted_per_second` is fine. Please disregard our warning about it.
287
+
288
+ The 2026-08-31 note told you that `llama-server`'s `timings.predicted_per_second` reports a
289
+ "prefill-contaminated" figure and to not use it. **That is wrong.** Re-measured today, that
290
+ counter agreed with wall-clock throughput to within 3% on every configuration we tried. It
291
+ was our harness that disagreed with reality, not the server.
292
+
293
+ The rule we should have followed, and now do: **a throughput number needs two independent
294
+ clocks that agree.** We report three β€” wall clock, post-first-token decode, and the server's
295
+ own counter β€” and treat any disagreement beyond ~10% as a measurement bug rather than a
296
+ finding. Had we done that in August, the harness would have failed its first run: it printed
297
+ `old method: 94.71` next to `decode: 369.09` and we read that as the old method having been
298
+ too conservative.
299
+
300
+ ### What survives and what does not
301
+
302
+ **Survives.** The `--n-cpu-moe 0` collapse at long context β€” 10.7Γ— is far too large to be a
303
+ metric artifact, and it reproduces in every clock. Do not run `--n-cpu-moe 0` at 98,304 on a
304
+ 32 GB card. The relative ordering *within* a single prompt and a single speculation setting
305
+ is also roughly preserved, since the inflation factor is common to those rows: the expert
306
+ cache really does overtake `--n-cpu-moe 0` at long context, and `--cache-reuse` really does
307
+ help decode and not only prefill.
308
+
309
+ **Does not survive.** Every absolute tok/s figure in the 2026-08-31 table β€” inflated by
310
+ roughly 1.5Γ— on the code prompt and less on prose. And any comparison **across** rows that
311
+ differ in speculation setting, including the Q3-without-spec against Q2-with-spec table,
312
+ because those rows produce different reasoning-to-content ratios and the inflation no longer
313
+ cancels.
314
+
315
+ **Unaffected, again.** No weights changed. The quality claims β€” 95.1% HumanEval, 9/10 on the
316
+ rare-name probe, 25% fabrication β€” are measured by counting correct answers, not by timing,
317
+ and do not move.
318
+
319
+ We are not republishing a full corrected table here until it has been re-run end to end with
320
+ the three-clock protocol. The honest anchor in the meantime: **as served
321
+ (`--n-cpu-moe 4`, `--spec-type ngram-map-k4v`, 98,304 context, KV `q4_0`), this build
322
+ generates 85 tok/s wall-clock on a code prompt**, and the MTP configuration described above
323
+ raises that to roughly 92-97 depending on offload.
324
+
325
+ *Two measurement corrections in two days, the second one correcting the first. The lesson we
326
+ are taking from it: a fix to a measurement does not validate itself. It has to be reconciled
327
+ against the method it replaces, and a large unexplained improvement in your own numbers is a
328
+ symptom before it is a result.*