Qwen3.5-397B-A17B: llama.cpp default slowed prose, sped JSON
On one RTX 5090 workstation running Qwen3.5-397B-A17B with roughly 127 GB of its weights in system RAM, with llama.cpp's default draft cutoff, speculative decoding (the model's own built-in drafter guesses a few words ahead, then the model checks the guesses) wrote prose 19.8% slower than no speculation and structured output 22.5% faster, in one run (160 measurements across five settings).
- If your setup is like this one (a very large model partly in system RAM), set the draft cutoff yourself, at 0.50 or higher (we tested up to 0.90) (
--spec-draft-p-min 0.50). Here 0.50, 0.75 and 0.90 made prose 18.6% to 22.8% faster than no speculation; 0.10 and 0.25 were still slower on prose. What to do - The popular 0.75 was llama.cpp's own default, with no sweep behind it that we could find. llama.cpp shipped 0.75 from February 2025 to May 2026, then 0.00, which never cuts a draft short. Where 0.75 came from
- Test your own setup, prose and structured output separately. A small model held entirely on the same GPU model showed the opposite sign in a public test, and at temperature 0, every prose answer here differed from the no-speculation answer. A short A/B test
What to do
The setting is the --spec-draft-p-min flag, a confidence cutoff for drafts. While the model drafts, drafting stops as soon as its confidence in the next drafted token (word piece) falls below the cutoff. At 0.00 drafting never stops early.
- Check which default you have. Since 2026-05-19 the flag defaults to 0.00. If you turned on speculation without setting it, you are running with no cutoff. If your config predates May 2026 and never set it, your effective setting changed when you rebuilt.
- If your setup resembles ours, set the cutoff explicitly, and not low. Ours is a large mixture-of-experts model (one that runs only some of its parts, called experts, for each token) with much of it in system RAM. Every cutoff we tested at or above 0.50 turned the prose slowdown into a gain against no speculation: +18.6% at 0.50, +21.9% at 0.75, +22.8% at 0.90. Whether going above 0.50 helps more was not resolved. Cutoffs of 0.10 and 0.25 wrote prose slower than no speculation at all (−32.0% and −23.7%), and 0.10 was near-identical to no cutoff, with byte-identical output.
- Measure your own workload, prose and structured output separately. Here the same default was −19.8% on prose and +22.5% on structured output; one pooled number would have shown neither (below).
- Do not assume speculation keeps the output the same, even at temperature 0, even with a cutoff. If identical output matters to you, test it: ours differed on every prose prompt.
- Expect the result to depend on your setup. A small model held fully on the same GPU model lost speed with the cutoff in a public test (other public results). No setting carries over without a measurement, including ours.
A short A/B test
Use your real prompts, split into prose and structured. Run the same prompts with and without the setting you are testing. Start a fresh server process for each setting. Do not repeat a prompt within a session: reused prompts can skip the cutoff (llama.cpp issue #26100). Pin temperature and seed. Compare writing speeds prompt by prompt.
Update, 28 November 2026: llama.cpp closed issue #26100 as “not planned” in September. The issue records no fix for repeated prompts skipping the cutoff.
What we found
Writing speed is tokens a second (t/s) while the answer streams. Each figure, except in the next table, is a median change against no speculation, paired prompt by prompt (16 pairs per cell). Brackets are the likely range around each result (95% intervals).
Prose: no-speculation median 10.20 tokens/s
| Treatment | Median t/s | vs no speculation | 95% CI |
|---|---|---|---|
--spec-draft-p-min 0.00 (the shipped default) | 8.12 | −19.79% | [−24.67, −17.90] |
| gate 0.50 | 12.06 | +18.58% | [+12.55, +26.45] |
| gate 0.75 | 12.35 | +21.87% | [+18.51, +27.01] |
| gate 0.90 | 12.43 | +22.78% | [+19.14, +25.10] |
Structured (JSON): no-speculation median 10.25 tokens/s
| Treatment | Median t/s | vs no speculation | 95% CI |
|---|---|---|---|
--spec-draft-p-min 0.00 (the shipped default) | 12.69 | +22.53% | [+7.57, +41.94] |
| gate 0.50 | 14.17 | +38.41% | [+32.40, +51.76] |
| gate 0.75 | 15.04 | +47.02% | [+27.09, +59.32] |
| gate 0.90 | 15.25 | +47.72% | [+40.27, +72.42] |
“Gate” is the cutoff value. All figures from data/analysis/analysis.md.
The same speculation that sped structured output up by a fifth slowed prose down by a fifth, in the same run, against the same baseline.
Against the default
The choice you actually face is a cutoff against the out-of-the-box default:
| Subset | 0.50 vs default | 0.75 vs default | 0.90 vs default |
|---|---|---|---|
| prose | +49.82% [+38.86, +60.94] | +53.12% [+49.28, +62.26] | +52.65% [+47.08, +63.58] |
| structured | +15.07% [−0.75, +26.36] | +18.03% [+4.35, +25.82] | +21.92% [+7.29, +36.13] |
On prose each cutoff was worth roughly +50% over the default, all intervals clear of zero. On structured output the gains are several times smaller, and the 0.50 interval contains zero. This table and the two above use the same measurements with a different baseline, so the figures do not stack.
One pooled number shows neither kind of output
| Treatment | Pooled median | 95% CI |
|---|---|---|
--spec-draft-p-min 0.00 (the shipped default) | −4.45% | [−19.56, +19.62] |
Pooled, the default's interval does not even settle the direction. Split, it is −19.8% on prose and +22.5% on structured output, both intervals excluding zero. An exploratory run the evening before on the same machine, with a different prompt set and 0.75 as its only cutoff, recorded a pooled −6.5% for the default; the different prompts allow no strict comparison.
Below 0.50: still slower than no speculation
A second run the next night measured cutoffs 0.10 and 0.25 against its own fresh no-speculation baseline, with the same build, settings and sixteen prompts (96 measurements, kept apart from the first run's 160).
Prose: second-night no-speculation median 11.04 tokens/s
| Treatment | Median t/s | vs no speculation | 95% CI |
|---|---|---|---|
| gate 0.10 | 7.56 | −32.04% | [−38.58, −27.37] |
| gate 0.25 | 8.47 | −23.73% | [−27.92, −20.09] |
Structured: second-night no-speculation median 11.40 tokens/s
| Treatment | Median t/s | vs no speculation | 95% CI |
|---|---|---|---|
| gate 0.10 | 11.63 | +1.22% | [−9.84, +24.71] |
| gate 0.25 | 12.41 | +5.61% | [−4.43, +25.03] |
Both low cutoffs slowed prose, with intervals well clear of zero. 0.25 was less bad than 0.10 on prose: +13.67% [+7.74, +21.40]. Neither low cutoff's structured result was resolved from zero; the 0.10 interval allows anything from −9.8% to +24.7%. So the turning point from slowdown to gain lies between 0.25 and 0.50 (see Limits).
At 0.10 the cutoff barely acted. Its outputs were byte-identical to the first night's no-cutoff outputs on 32 of 32 prompt-and-cycle pairs, and its draft counters matched on 22 of 32, the rest differing by at most a dozen drafted tokens. So the gap between −19.8% (no cutoff, first night) and −32.0% (0.10, second night) is variation between nights, not a treatment effect: the no-speculation baseline sped up (prose median 10.20 → 11.04 t/s, +8.2%) while this effectively unchanged speculative setting slowed (8.12 → 7.56, −6.9%). 0.25 did change the output, on 18 of 32 pairs.
Above 0.50: not resolved
The analysis plan, written before any data, defined the turning point as the lowest cutoff that beats no speculation on prose with an interval excluding zero, and whose step to the next cutoff up has an interval containing zero. 0.50 met it:
| Clause | Contrast | Result |
|---|---|---|
| 1 | gate 0.50 vs none, prose | +18.58% [+12.55, +26.45]: positive, excludes zero |
| 2 | gate 0.75 vs gate 0.50, prose | +2.17% [−1.31, +5.58]: contains zero |
| n/a | gate 0.90 vs gate 0.75, prose | +0.51% [−2.40, +3.03]: also contains zero |
Going above 0.50 gave no clear further gain: the steps were +2.17% and +0.51% on prose, and the intervals allow further gains of roughly 5.6% and 3.0%. Containing zero reflects the test's size (two cycles, sixteen prompts), not proof the settings match. Structured steps are even less clear: 0.75 vs 0.50, +4.64% [−3.42, +12.25]; 0.90 vs 0.75, +6.19% [−2.27, +8.65].
Why: how many drafted tokens were kept
Acceptance is the share of drafted tokens the model kept, from the server's own counters (n = 32 per setting, 16 per output type). Ranges observed:
| Treatment | All (n=32) | Prose (n=16) | Structured (n=16) |
|---|---|---|---|
| default 0.00 | 0.21 – 0.89 | 0.21 – 0.33 | 0.37 – 0.89 |
| gate 0.50 | 0.51 – 1.00 | 0.52 – 0.72 | 0.51 – 1.00 |
| gate 0.75 | 0.71 – 1.00 | 0.82 – 0.92 | 0.71 – 1.00 |
| gate 0.90 | 0.72 – 1.00 | 0.89 – 0.98 | 0.72 – 1.00 |
| Treatment (second night, 2026-08-11) | Prose (n=16) min / median / max | Structured (n=16) min / median / max |
|---|---|---|
| gate 0.10 | 0.207 / 0.254 / 0.327 | 0.367 / 0.481 / 0.889 |
| gate 0.25 | 0.273 / 0.299 / 0.399 | 0.430 / 0.519 / 0.889 |
Computed from the per-observation counters draft_n and draft_n_accepted in every record.
On prose the ranges do not overlap between neighbouring settings: with no cutoff only a fifth to a third of drafted prose tokens were kept, and acceptance climbs with the cutoff. At 0.10 and 0.25, prose stayed in a ~0.21–0.40 band while structured reached 0.89. Structured drafts were good even with no cutoff. Our reading, which fits the setup but was not instrumented: each rejected draft wastes checking work that a model running from system RAM can least afford, and prose is where drafts fail. The counters show a link between cutoff, acceptance and output type, not a cause.
When llama.cpp's maintainer dropped the default to 0.00 (PR #23269, 2026-05-19), he stated that a cutoff produces drafts of different sizes, which prevents CUDA-graph reuse (a GPU speed-up), and advised using it “with caution”. That cost should weigh most for small models running fully on the GPU and least where writing waits on system memory, as here. This test measured no graph reuse, memory bandwidth or draft-versus-check time, so the two public signs fit that tradeoff without confirming it. Where between those two setups the sign flips is unmeasured.
Output changed, even at temperature 0
In the textbook account, the full model checks every drafted token, so speculation gives the same text faster, byte for byte at temperature 0. Here prose differed under every setting:
| Treatment | Prose byte-identical to baseline | Structured byte-identical |
|---|---|---|
| default 0.00 | 0 / 16 | 10 / 16 |
| gate 0.50 | 0 / 16 | 10 / 16 |
| gate 0.75 | 0 / 16 | 14 / 16 |
| gate 0.90 | 0 / 16 | 14 / 16 |
Two no-speculation sessions, separate processes about 85 minutes apart with the same seed, matched each other 16/16 byte-identical. So the difference arrives with speculation, and a cutoff does not remove it: the cutoff controls speed, not sameness. The 256-token answer cap does not explain it. Prose pairs where either side hit the cap number 6, 5, 4 and 6 of 16 (0.00, 0.50, 0.75, 0.90); the other 10, 11, 12 and 10 pairs compare two finished answers, and every one still differs. All structured differences are between finished answers. The cause was not identified; candidates include batched checking changing the order of floating-point arithmetic, or an implementation path departing from the textbook scheme.
Every structured output passed the strict JSON validator in every setting, including baseline, with zero fenced outputs (wrapped in code fences); whether differing texts mean the same thing was not checked. The cap was reached on 12 of 160 observations (baseline: prose_05 and prose_07 in both cycles; 0.00: prose_01 and prose_07 in both cycles; 0.50: prose_03 and prose_07, cycle 2; 0.90: prose_03 in both cycles; 0.75: none). None of those looked like an empty answer, and the run logged zero hidden-reasoning events in 160 measurements.
On the second night, 0.10 and 0.25 again matched baseline prose 0 of 16 times, while that night's two baseline sessions matched each other 16/16: no tested cutoff from 0.10 to 0.90 kept prose output the same. The cap was hit on 9 of 96 measurements, all prose. The cutoffs truncated prose_01, which the baseline finished, while the baseline truncated prose_05 and prose_07 as on the first night, so speculation changes what is written, not just how fast. One more observation, with no known mechanism: 0.25 reproduced its own prose across its two fresh processes on only 1 of 8 prompts, while 0.10, the baseline and every structured cell reproduced themselves 8/8. The first night's cutoffs were not checked this way.
Where the recommended 0.75 came from
Mid-2026 posts recommend --spec-draft-p-min 0.75 as the setting that “fixes” speculative decoding. We found no published sweep behind it. llama.cpp's own history, checked against a copy of the repository:
| Date | Commit | What changed |
|---|---|---|
| 2024-11-25 | d9d54e498 | the gate is introduced with a default of 0.9 (PR #10362) |
| 2025-02-19 | abd4d0bc4 | default drops to 0.75 (PR #11954, by the project's maintainer) |
| 2026-05-19 | d14ce3dab | default drops to 0.00 (PR #23269): the line it replaced carried a // TODO: change default to 0.0f |
So 0.75 was llama.cpp's own shipped default for roughly fifteen months, after 0.9 for about three months. The pull request that set it carries no benchmark: its entire body reads “Better defaults for speculative decoding.”, and it was opened and merged the same day with no recorded discussion, normal for a small default-only change by the maintainer. The same commit moved the minimum draft length from 5 to 0.
Whatever the author knew, a post recommending 0.75 after May 2026 puts back by hand the previous default; the change was recorded in the project's history, not shown at runtime. One dated exception: the earliest split-by-task measurement cited below (2026-05-12) came a week before the change. The earliest write-up cited showing a cutoff reversing the prose loss came three days after it.
0.75 still appears in llama.cpp's server README example payloads ("speculative.p_min": 0.75), the speculative-simple example README still shows the original 0.9, and the separate ik_llama.cpp fork still defaults to 0.75. Unsloth's raw READMEs for three MTP GGUF repositories and its MTP documentation page, checked 2026-08-11, contain no p_min recommendation at all, so the claim that Unsloth recommends 0.75 is not supported by its current docs.
The default was changed on purpose, with a stated tradeoff and a TODO already in the code, and the code behaves as designed. The gap is that the change flipped the sign of prose writing speed on at least one kind of setup, and no measurement we could find separated those setups before the advice spread.
Other public results
- neoteric.no (2026-05-22) showed a cutoff reversing the loss on a Qwen3.6-27B Q4 on an RTX 3090 Ti: 29.0 t/s without speculation, 48.9 t/s at 0.75 (+68%). Its statement that no cutoff is slower is in words only; its table has no column for that.
- A Chinese-language post on 掘金 (juejin), 2026-05-12, “MTP 加速不是玄学” (“MTP speedup is not black magic”), the earliest split-by-task result we found: on a dense 27B (not mixture-of-experts), creative writing at −9%/−4% against +171% on coding, with acceptance 39–48% vs 79–89%. It came ten days before the earliest English-language post we found. A single post with point numbers, no intervals or repeat counts. juejin.cn/post/7638806086187057178 (title and figures confirmed 2026-08-11).
- A sweep below 0.75 that chose 0.5. A launch-config file from an r/LocalLLM post (~2026-07-01, preserved at pastebin.com/raw/P57Uk6rz) says a cutoff of 0.5 was best across 2k/15k/64k context depths at 6 drafts (119/122/118 t/s against a 106–126 range for the others). The file names Qwen3.6-27B-MTP-Q6_K and a draft maximum of 10; an RTX 5090 and build 86b9470 come only from a newsletter (smol.ai, 2026-07-02). It landed on 0.5 before this study, but the full grid is unpublished, whether 0.75 was in it is unstated, and it has no interval and no prose/structured split.
Three public two-point comparisons disagree about which way the cutoff moves speed:
| Source | Setup | Result |
|---|---|---|
| koboldcpp #2271 (2026-06-14) | not stated in what we retrieved, so it weighs less | gate 0.1 → 19.95 t/s, gate 0.75 → 22.74 t/s: higher gate better |
| a comment on llama.cpp PR #23269 (2026-05-19) | RTX 5090, Qwen3.6-27B Q4 | gate 0.75 → 77 t/s, 0.00 → 87 t/s: reported a 14.1% penalty from the gate: the opposite sign to ours, on the same GPU model |
| llama.cpp #25908 (2026-07-19) | RDNA4/Vulkan, Qwen3-4B | 0.00: acceptance 0.070, 32.6 t/s → 0.75: acceptance 0.898, 164.3 t/s |
The PR #23269 row shows the opposite sign is real on the same GPU model when the model is small and fully on the card.
Limits
- One setup. One model file, one split between card and RAM, one request at a time, and only the
draft-mtppath. The classic separate draft model (--model-draft) and other inference programs (vLLM, text-generation-inference, TensorRT-LLM) were not tested. The speed effects belong to the flag, not to the model's quality. - The turning point is bracketed, not located. 0.10 and 0.25 come from the second night, 0.50 and above from the first. The second night's baseline wrote roughly 5–10% faster on identical settings, a shift of unknown origin larger than several of the differences in play. Locating the point needs one same-night run with cutoffs on both sides of it.
- Each interval stands alone. There is no correction for making many comparisons (five treatments × two output types × two contrast families), so the intervals do not hold 95% together. Two cycles in reverse order balance steady drift only; effects tied to restarts remain. Drift was visible: +9.98% in the default's cycle 2, and +6.35% for the baseline in cycle 1, the night's first cold process.
- Output sameness is byte-level only, with a 256-token cap reached on 12 of 160 measurements, and says nothing about meaning.
- Results are tied to the build. The flag's default has changed twice and may change again; treat version-specific findings as unchecked since August 2026.
Corrections and updates
This page said all 160 structured outputs passed the strict JSON validator. The main run had 80 structured outputs (16 in each of five settings), and all passed. The second run's 48 structured outputs also all passed.
How this was measured
| Dates | Main run 2026-08-10, 18:16–19:43 EDT. Second run 2026-08-11, 00:09–01:05 EDT, same machine. |
|---|---|
| Model | Qwen3.5-397B-A17B, the Unsloth UD-IQ3_XXS build (a compressed version), four GGUF shards, ~150 GB on disk. |
| Runtime | llama.cpp mainline at commit c8e03ce: llama-server --version printed version: 1 (c8e03ce) before the first row, and every streamed chunk carries system_fingerprint: "b1-c8e03ce". llama-server is a 17.9 KB launcher whose SHA-256 does not pin the build; the code lives in shared objects beside it. |
| Hardware | One NVIDIA GeForce RTX 5090. Graphics memory in use: ~20.3 GB with no speculation, 24.0–24.1 GB with speculation loaded. Server used ~126.8 GB of system RAM. |
| Placement | --n-gpu-layers 999 --n-cpu-moe 57: attention and shared weights on the GPU, the experts of 57 layers in system RAM. We read writing speed here as limited by system memory bandwidth; that is an inference from the setup, not a measurement. |
| Speculation | --spec-type draft-mtp --spec-draft-n-max 6. draft-mtp drafts from the model's own multi-token-prediction (MTP) head; there is no separate draft model. Only --spec-draft-p-min varied: absent (none), 0.00, 0.50, 0.75, 0.90; second run 0.10 and 0.25. The cutoff stops drafting, not single tokens (common/speculative.cpp:316-321, comment “only collect very high-confidence draft tokens”; help text at common/arg.cpp:3588-3589). |
| Server config | --ctx-size 65536 --parallel 1 --no-mmap --flash-attn on --threads 24 |
| Requests | Temperature 0, seed 42, max_tokens 256, streaming with per-chunk usage. Sixteen fixed prompts: 8 prose, 8 structured (JSON against a strict validator). |
| Design | Main run: ten server loads, five treatments × two cycles, cycle 2 in exact reverse order, a fresh process per session; sixteen measured prompts per session plus a warmup and calibration probes left out; 160 measurements, zero excluded, every session 16/16 usable with exit 0. Second run: six loads (a fresh baseline plus 0.10 and 0.25, two cycles), 96 measurements, zero excluded, never pooled with the 160. |
| Analysis | Plan written in the run log before the first measurement (not an outside registry): writing speed paired within prompt and cycle; prose and structured never pooled first; each treatment against no speculation first, steps between neighbouring cutoffs secondary and exploratory. 95% intervals by resampling (cluster bootstrap), 2,000 resamples, percentile method, no BCa correction, no multiplicity correction. |
| Writing speed | Visible token events divided by the time from first to last visible token, which leaves out prompt reading and time to first token. This is biased high by N/(N−1); an unbiased version recorded beside it never differed by more than 0.02 percentage points on any headline cell. |
| Setting checks | A per-treatment server alias, the running process's real command line read back on every row, and the graphics-memory step between baseline and speculative loads. These checks stand in for a label the test client cannot verify. |
| Prompt reuse | llama.cpp issue #26100 (2026-07-24) reports that reused prompts bypass the cutoff, inflating speed 9.5–16.9×. Avoided four ways: --cache-prompt never passed (all ten command lines), no prompt repeated within a session, a fresh process per session (ten distinct process numbers, or PIDs), and a fastest observation of ~1.9× baseline. |
| Recompute | 2026-08-11: a recompute from the raw records reproduced every main-run median and interval to the last printed digit. A recompute of the second run by a separate code path reproduced its headline medians to the second decimal. |
Data and sources
The data package holds the files both runs produced:
- data/README.md: what is in each folder, the record schema, and where every file came from.
- data/NUMBERS.md: every figure on this page, with the file and field it came from.
- data/RUN_LOG.md: the analysis plan and turning-point rule, written before the first measurement.
- data/analysis/: the analysis outputs behind every table, and the per-measurement CSV.
data/flags/anddata/loads/: the server command line and load record for all ten loads. One JSONL record file per session holds every request, response, timing and draft counter.- The second run, same layout, under
data/lowerarm/: data/lowerarm/RUN_LOG.md, data/lowerarm/analysis/. - The pastebin file cited above, saved 2026-08-10: data/third-party/. The Reddit and X threads themselves could not be retrieved, so the Reddit evidence rests on that file plus the newsletter.
If a number on this page disagrees with a file in the package, the file is right and the page is wrong; tell us and we will fix the page.