Speculative decoding on an M4 Max: MTP vs DFlash 2, measured

A small drafter proposes tokens for the target model to check. On my M4 Max, one build went from 16.7 to 35.5 tok/s in the greedy lane; a separate sampled-thinking lane reached 47.2. Native MTP on another target went from 18.5 to 22.9.

Two parallel copper tracks curving across a marble desk, a finer guide rail running ahead of the main track
Illustration: two parallel copper tracks curving across a marble desk, a finer guide rail running ahead of the main track.

This note settles the “measurements pending” line on my 14 August 2026 download receipt. The second lesson came from refusing to trust the first number my own logs showed me.

How speculative decoding works

A smaller drafter proposes tokens and the target checks them in a batch. Accepted proposals can reduce expensive target steps, but drafting and verification both have overhead. The benefit depends on acceptance, prompt and output length, and implementation. Exact speculative decoding is designed to preserve the target distribution; check output parity for the actual runtime and fixed greedy settings rather than assuming every implementation is numerically identical.

Two ways to get a drafter

There are two kinds, and on my runner each model uses one or the other. The model’s own architecture decides which.

  • Native multi-token prediction (MTP). Some builds ship extra prediction weights alongside the main model. The drafter is part of the checkpoint, so you switch it on instead of installing it.
  • An external drafter. DFlash 2 is a separate ~2B Apache-2.0 model trained to track Qwen3.8-27B’s outputs. It attaches to any compatible target that has no draft head of its own.

I measured both, because I run two Qwen3.8-27B community derivatives on this Mac. One is a vision-capable 4-bit build (17 GB, quantization group 128) that ships its own MTP weights. The other is an abliterated 4-bit build (14 GB, group 64) with no draft head, so it gets DFlash 2. My note on uncensored local models covers what abliteration is and why I use it at all; this note treats that build only as an inference target.

How I measured

I collected every number below the same way and changed one variable at a time:

Method, the same for every run
PROMPT        same shape every run · ~2,150 tokens
STREAMING     on · first-token time (TTFT) recorded
DECODE RATE   completion tokens ÷ (wall − TTFT)
RUNS          three per configuration · mean reported
CONCURRENCY   1 request · one config change per A/B
CONTEXT       128K configured · 262K native

That definition is why the decode rates and the runner’s logged figure below disagree. The log used a different definition, and it nearly made me revert a working configuration.

Decode rates by configuration

Decode rate by configuration on my M4 MaxSix bars in tokens per second, mean of three runs: MTP build with speculation off 18.5 (runs 17.9 to 19.1), native MTP on 22.9 (19.4 to 25.7), abliterated build with speculation off 16.7 (16.0 to 17.2), DFlash 2 drafter in the sampled lane 38.7 (35.8 to 40.6), DFlash 2 with the card’s greedy settings 35.5, DFlash 2 in the reasoning lane with thinking on 47.2.Decode (tok/s)MTP build · speculation off18.5MTP build · native MTP on22.9Abliterated · speculation off16.7DFlash 2 · sampled lane38.7DFlash 2 · greedy settings35.5DFlash 2 · reasoning lane47.2050
Decode rate on my M4 Max (128 GB) with oMLX 0.6.3rc1, mean of three runs per configuration, 20 August 2026. The DFlash 2 rows run on the abliterated build. The line through four bars spans the three runs listed under the table.
Decode rate, change against each build’s baseline and draft acceptance, by configuration.
ConfigurationDecode (tok/s)ChangeDraft acceptance
MTP build · speculation off18.5baselinenone
MTP build · native MTP on22.9+24%~69% (build’s card)
Abliterated build · speculation off16.7baselinenone
+ DFlash 2 · sampled lane38.7+131%66–82%
+ DFlash 2 · card’s greedy settings35.5+113%65–72%
+ DFlash 2 · reasoning lane, thinking on47.2+183%~68–71%

Each mean covers three runs. The +131% row is [35.8, 40.6, 39.7] tok/s against a [16.9, 16.0, 17.2] baseline; the MTP row is [23.8, 25.7, 19.4] against [18.5, 17.9, 19.1]. Cold first-token time on the drafted build also fell on its own, from 15.41 s to 11.41 s, before any cache was involved. Separately, a warm prefix cache cut time to first token on the long prompt by 90%, from 12.34 s to 1.23 s.

Three things stand out in the table:

  • The fastest lane is the reasoning lane. Thinking tokens are highly predictable, so the drafter lands more of them. That lane also runs neutral penalties, which keeps the verification path free of logits processors.
  • Greedy settings stabilise acceptance. The card’s greedy settings narrowed acceptance to 65–72% and decoded slightly slower than the sampled lanes.
  • A finetuned target costs acceptance. DFlash 2 publishes 2.7–3.4× at batch 1 against stock Qwen3.8-27B weights on data-centre GPUs. Against an abliterated derivative on this Mac it delivered 2.1–2.8×. The drafter was trained to track stock outputs, and every behavioural change finetuned into a derivative is a guess it has never seen.

The failed first pairing

The table above came from a later attempt the same day. Earlier that afternoon I attached DFlash 2 to the MTP build, the target that already ships its own draft weights. That run used a stricter harness: temperature 0, fixed seed, 128-token outputs and exact SHA-256 output-parity checks, on a machine I deliberately left in its real multi-service state.

DFlash 2 on the MTP build: decode rate with and without the drafter, by context length.
ContextTarget only (tok/s)DFlash 2 (tok/s)ChangeAcceptance
4,09616.1514.93−7.5%57.8%
16,3849.3510.20+9.1%62.5%

A quantized-draft variant did better, +1.5% at 4K and +26.1% at 16K, but it was slower end to end at both contexts. Its median decode gain also sat under the 15% adoption gate I had set in advance. So that configuration shipped disabled, with exact output parity confirmed and the draft files kept. The runner allowed an external drafter on a build that already carries draft weights; the numbers vetoed it.

Re-pairing the drafter with the build that has no draft head, the same evening, unlocked every gain in the table above. Acceptance barely separates the two experiments: roughly 58–62% on the wrong target and 65–82% on the right one. The outcome changed because of everything around the drafts. The evening run used the quantized draft, generations far longer than the afternoon’s 128-token outputs, and lanes whose text the drafter predicts well. Acceptance on its own does not tell you the speedup.

The same drafter family measured 139.7 tok/s on this model at 32K context on my RTX 5090 (my remote RTX 5090 setup). The Mac-versus-RTX 5090 deployment comparison is in M4 Max vs RTX 5090 for local LLMs.

The public lab repository includes the earlier 20 August Mac trial and its raw records. It explicitly does not include the later headline Mac runs’ raw logs; those results remain author-reported in this note.

The number that nearly reverted a working configuration

My runner logs speculative-decoding throughput like this:

The runner’s log line
generation complete: 181 tokens, 11.3 tok/s, acceptance=74.0%,
  phases[prefill=10970.8ms draft=232.9ms verify=244.8ms
         replay=24.1ms commit=49.2ms]

The log says 11.3 tok/s, and my no-drafter baseline decoded at 16.7. For a few minutes on 20 August 2026, my working conclusion was “DFlash 2 is a regression; revert it.”

The logged figure is end-to-end: total tokens divided by total wall time, prefill included. With a ~2,150-token prompt, prefill alone took ~11 of the 16 seconds. Measured as a decode rate, meaning completion tokens over the window after the first token, the same run was 35.8 tok/s. On this target, that is the whole difference between “broken” and “a 2.3× speedup.” One phase dominated the denominator, and the log never said so.

  • Never compare an end-to-end figure against a decode baseline. Both are valid measures, and mixing them invents a regression or a miracle.
  • Warm-cache runs set the opposite trap. With TTFT down to ~1 s, cache-restore work lands inside the decode window, so decode looks slower while the run is clearly faster. I compare warm runs end to end only.

Read the derivative’s own model card

My second configuration error that session was applying the base Qwen sampling recipe (temperature 1.0, top-p 0.95, top-k 20) to the abliterated build, because the original model documents it. The derivative’s own model card rejects those values. It wants greedy temperature 0 and a repetition penalty of 1.15 that it calls essential, because without it greedy decoding loops on imports and boilerplate. It also wants no top-p or top-k and no system prompt. The derivative’s card overrides the base card.

Two more traps sat on top of that:

  • Profiles override model defaults. A sampling fix applied to the model’s settings silently does nothing for any profile-suffixed endpoint. I now fix the profile first and the model second.
  • Penalties did not disable the drafter. I assumed a non-neutral repetition penalty would trip the speculative path’s processor-conflict gate. I measured it, and it does not: that gate belongs to the native-MTP path on this runner. I now measure which setting disables which lane instead of assuming it.

I recorded one deviation as an owner decision: the sampled-thinking lane uses neutral penalties rather than the derivative card’s greedy recipe. In this tested lane I verified loop-free output (longest repeated 6-gram across the test outputs: 2). That does not establish that repetition penalties never matter when sampling is enabled. The lane remains the fastest decode result in the measured table.

Disk cache, helper models and memory

  • The disk cache shipped with a 185 GB ceiling. This Mac had ~153 GB free. An SSD prompt cache whose default ceiling exceeds the disk’s free space will eventually fill it. I capped it at 40 GB with a 16 GB hot tier.
  • Hide the helper models. Without that flag every client offers the 2B drafter as a standalone chat model. One accidental selection, and your “27B review” is a 2B answering.
  • Memory has room to spare. Both targets resident together hold 32.6 GB of 128 GB, and the KV cache pages in lazily at roughly 0.25 MB per token. That spare memory is room for longer context; the arithmetic in the quantization guide still applies.

The local receipt

Speculative decoding receipt · measured 20 Aug 2026

Machine
MacBook Pro · Apple M4 Max · 128 GB unified · 40-core GPU
Runner
oMLX 0.6.3rc1 · local server · loopback only
Targets
Two Qwen3.8-27B community derivatives · 4-bit · 17 GB and 14 GB
Drafter
DFlash 2 · ~2B parameters · Apache-2.0
Context
128K configured of 262K native
Method
Streamed · decode = completion ÷ (wall − TTFT) · three runs per config · concurrency 1
Best decode
47.2 tok/s · +183% over the 16.7 baseline
Decision
Adopt both lanes, per the field-note contract

This closes the “measurements pending” status from my Qwen3.8-27B 8-bit review and updates the current entry in the local model field notes. One caveat: that review named the stock 8-bit conversion, but these numbers come from a pair of 4-bit community derivatives, so they do not cover that model. The download plan changed when the drafter did.

What I am not publishing: the repositories of the two modified community builds, and my local port and profile layout. The uncensored-models note explains that boundary. The method transfers to any compatible target-and-drafter pair without either.

Sources

Suhail Mohebi · published 25 August 2026 · the cover is a generated illustration

Use this

Check if a model fits →

← Previous: Qwen 3.8 27B on Mac: M4 Max MLX review and RAM needs

Want this inside your team’s workflow? The Verified AI Operations Sprint tests one workflow in ten working days. See the sprint →

How speculative decoding works
  1. How speculative decoding works
  2. Two ways to get a drafter
  3. How I measured
  4. Decode rates by configuration
  5. The number that nearly reverted a working configuration
  6. Read the derivative’s own model card
  7. Disk cache, helper models and memory