While decode is memory-bound, a forward pass over a few tokens costs little more than over one, so a cheap drafter guesses the next k tokens and the large target model checks them all in one pass; an acceptance rule keeps exactly what the target would have sampled, so the output is unchanged and only the time per token falls, until the batch is large enough that checking stops being free.
Fig. 1 is one round on a real position: the code-edit answer at “Calculate the mean of”, with the distributions recorded from both models measured here (Qwen3-1.7B target and Qwen3-0.6B draft, 4-bit MLX), read greedily.
You need: prefill, decode and why a decode step is memory-bound (the parent Topic: inference-and-serving, sections 1 and 2; the roofline is on Performance math), and what a next-token distribution and temperature are (Sampling and decoding). How multi-token prediction modules are trained is on Families and objectives; this page is how any drafter is used at serving time.
Running example: the parent page's chat assistant, here a Qwen3-4B (or 1.7B) target with a Qwen3-0.6B draft from the same family, so they share a tokenizer, on an Apple M1 Pro (16-core GPU, 16 GB) with llama.cpp and MLX. Results run here are marked measured here with what transfers to datacenter GPUs; published results are marked by who measured them.
A language model produces one token per forward pass, and each pass depends on the token before it. During decode each pass processes one new token per user, yet it reads every weight from memory. Qwen3-4B at 4-bit (Q4_K_M) is a 2.50 GB file: every token of the answer reads those bytes once. On the M1 Pro that pass took 23.8 ms, about 42 tokens per second measured here.
At about 2 operations per weight per token, that is roughly 8 billion operations per token, so under 0.4 trillion per second, on a GPU that did 3.4 trillion per second while processing a 512-token prompt (the same weights, read once, used for 512 tokens). The arithmetic units are mostly idle; the step waits for memory: the memory-bound regime. A pass over k + 1 tokens reads the same weights once, so checking k guesses should cost little extra.
On a datacenter GPU checking is nearly free: in the derived H100 curve a pass stays within 10% of the one-token time up to about 165 tokens (a 5-token check costs 1.00x a 1-token pass, Llama 3.1 8B FP8), because the H100 does about 590 FP8 operations per byte it reads (1,979 TFLOP/s over 3.35 TB/s) and a few extra tokens use a sliver of that. On the laptop the measured curve is a staircase: 2 tokens cost 1.74x one token, 5 tokens 2.68x, yet 16 to 32 tokens only about 4.0 to 4.4 times. The steps are kernels, not physics (closed block below); Qwen3-1.7B at Q8_0, which gets the small-batch kernel from 2 tokens, costs 1.46x for 5 tokens (toggle in the chart).
llama.cpp's Metal backend multiplies a quantized weight matrix by 1 token with a matrix-vector kernel; it has a small-batch kernel for 2 to 8 tokens, but for the Q4_K and Q6_K formats in this file only from 4 tokens; and above 8 tokens it switches to a matrix-matrix kernel (ggml-metal-ops.cpp L2442 to L2470, ggml-metal-common.cpp L28 to L35). So 2 and 3 tokens are handled almost one at a time, which is why 2 tokens cost 1.74x and not about 1x.
Fig. 1 was one step; in general: the drafter proposes the next k tokens (typically 2 to 8; here Qwen3-0.6B runs k times in a row), and the target runs once over the last accepted token plus the k guesses, which gives k + 1 distributions. Walk the guesses left to right and keep each one the target agrees with (section 3 says exactly what "agrees" means); at the first disagreement, replace that guess with a token drawn from the target and throw away the rest; if every guess survives, take one more bonus token from the target's last distribution.
One target pass therefore yields between 1 token (the first guess was wrong: no worse than plain decoding, apart from the drafting time) and k + 1. Both models' KV caches are rolled back past rejected guesses. Here is a real answer, step by step.
measured here Draft Qwen3-0.6B, target Qwen3-1.7B, k = 4, greedy; written from scratch on MLX with KV caches (the same cache handling as mlx-lm); both models 4-bit. A step that ends in a blue token had a rejection or used its bonus. Acceptance is a property of the text as much as of the drafter.
measured here p and q are the real distributions at that position (top 50 tokens kept on both; the 8 tokens with the largest p + q shown, guesses can fall outside them). The 16 guesses and coin flips are drawn with a fixed seed and reused by both rules, so the only difference is the rule.
When the target samples with temperature, "agree" cannot mean "the guess equals the target's top token": we want the kept text distributed exactly as if the target had sampled it alone. Write p for the target's next-token distribution and q for the draft's, at the same position. Overlay them: the overlap min(p, q) is what can be accepted cheaply; the part of p sticking out above q is what the draft under-proposed. Here is a real position from a story the target wrote (Qwen3-1.7B target, Qwen3-0.6B draft, temperature 1), and the same 16 draft guesses judged by two exact rules (Fig. 2).
Why it is exact (Leviathan et al. 2023 and Chen et al. 2023, found independently). The chance of outputting x through acceptance is q(x) · min(1, p(x)/q(x)) = min(p(x), q(x)). The chance of a rejection is β = 1 − Σ min(p, q), and the residual's total mass is Σ(p − q)+ = Σ(p − min(p, q)) = β too, so the chance of outputting x through rejection is β · (p − q)+(x)/β = (p(x) − q(x))+. Add them: min(p, q)(x) + (p − q)+(x) = p(x). The draft only changes how often we get the token cheaply, never which token we get. A guess is kept with probability
The second rule is also exact, and slower. llama.cpp and mlx-lm sample the target's own token at each position and keep the guess only if the two are equal (llama.cpp common/sampling.cpp L678 to 705). Every output token is a genuine sample from p, so the distribution is exact, but a guess survives with probability Σ p(x) q(x), lower than Σ min(p, q) whenever the target is uncertain. With a greedy draft (q all on the draft's top token, what llama.cpp and vLLM's default do), both rules keep a guess with probability p(draft token). Over the target's own story text, mean per-guess acceptance was 0.49 under min(1, p/q) with a sampled draft, 0.47 with a greedy draft and 0.37 under sample-and-compare with a sampled draft measured here.
Five tokens. Set the target's p and the draft's q (each normalised to sum to 1), pick a rule, and compare its output distribution (green, or orange when it is wrong) with p (blue). Predict first: with "Draft far from target", which rules still output p?
Rules: min(1, p/q) with residual (Leviathan et al., vLLM); sample and compare (draft samples from q, target samples from p, keep if equal: llama.cpp and mlx-lm at temperature > 0); greedy draft (draft proposes its top token, kept with probability p(token): llama.cpp's drafter and vLLM's default); bug: resample from p (on rejection draw from p instead of the residual); no verification (always keep the draft's token). Output distributions are computed exactly; the simulation draws with a fixed seed and runs a chi-square test against p.
Tested on real models. A proof is a proof, but implementations have bugs. For the story prompt, 20,000 four-token openings were drawn with each rule (k = 3, temperature 1, top-k 50, so steps include rejections, residual draws and bonus tokens) and compared with the target's exact probabilities for all 296 openings with an expected count of at least 5, plus one "other" bin (a chi-square goodness-of-fit test).
The control and the three exact rules give p-values of 0.26, 0.56, 0.47 and 0.37, indistinguishable from sampling the target directly; the bug (on rejection, draw from p instead of the residual) over-produces the tokens both models like and fails by a chi-square of 4,357. With 20,000 samples a rule that shifted the opening distribution by more than a few percent of total variation would fail.
For the story prompt, draw 20,000 sequences of the first 4 output tokens with each rule (draft Qwen3-0.6B, target Qwen3-1.7B, both 4-bit MLX; temperature 1 and top-k 50 on both; k = 3, so a step can end in a rejection, a residual draw or a bonus token, and a second step is needed when fewer than 3 guesses are kept). Every distribution was computed with a full forward pass over prompt plus prefix and cached by prefix, so each rule saw exactly the same p and q. The exact target probability of every 4-token opening with an expected count of at least 5 (296 openings, 86.6% of the probability) was computed from the same distributions, the rest pooled into one bin, and each rule's counts compared with a chi-square goodness-of-fit test. A rule that preserves the distribution gives a p-value spread uniformly between 0 and 1; a broken one gives a p-value near 0.
measured here Bars: observed count of each of the 12 most likely openings against the target's exact expected count (20,000 × probability). Acceptance per step counts guesses kept in the steps needed for 4 tokens, so it is lower than a full step's.
At temperature 0 the rule reduces to "keep the guess while it equals the target's top token", and the output should equal plain greedy decoding. In exact arithmetic it does; in floating point a batched verification pass rounds differently, and at near-ties the top token can flip (closed block). Neither output is wrong.
The target's logits for a position depend slightly on how the computation was batched. Computing a sequence's logits in blocks of 7 tokens (as a k = 6 verifier does) instead of one token at a time moved individual logits by up to 2.94 on the 4-bit Qwen3-1.7B in MLX (which computes in bfloat16, about 3 significant digits), and changed the top token at 6 of 796 positions across four prompts, each one a near-tie where the top two logits were at most 0.50 apart measured here. That is why the parent's Engine bench saw mlx-lm's k = 6 output differ from its own plain output on two prompts. Where the k = 6 run left the plain run, the candidates were tied to within bfloat16 rounding, and different ways of computing the same position disagreed on the winner: on the summarize prompt at token 3 (after "Large language"), the plain run chose " models", the k = 6 run " model", and recomputing that position as one full pass, one token at a time and in blocks of 7 gave " model", " model" and " model", with the top two logits 0.000, 0.250 and 0.250 apart; on the story prompt at token 51 (after "rifted from the sea, its"), the plain run chose " cap", the k = 6 run " label", and recomputing that position as one full pass, one token at a time and in blocks of 7 gave " surface", " surface" and " surface", with the top two logits 0.125, 0.000 and 0.125 apart. Greedy decoding is only as deterministic as the arithmetic underneath it (the same holds for any change of batch size, with or without speculation). If greedy outputs change after enabling speculation, check that the first difference is at a near-tie (here the top two logits were at most 0.250 apart at each divergence), and compare against plain decoding with the same batch shapes.
Say each guess is kept with probability α = 0.8, independently, and k = 4. The first guess survives with probability 0.8, the first two with 0.64, three with 0.512, all four with 0.4096, and the target always adds one token of its own. So a step yields on average 1 + 0.8 + 0.64 + 0.512 + 0.4096 = 3.36 tokens per target pass derived.
The yield is capped at 1/(1 − α) however long the draft: at α = 0.7 that is 3.33, and k = 4 already gets 2.77 of it. And it is very non-linear in α: at k = 4, α = 0.5 gives 1.94 tokens per step, α = 0.9 gives 4.10. "Acceptance rate 0.7" and "acceptance length 2.8" are different numbers; engines report one or the other (vLLM and SGLang acceptance length, llama.cpp drafted and accepted counts, from which a per-drafted-token rate follows but not α), and a per-drafted-token rate falls as k grows because tokens after the first rejection are wasted.
Real acceptance is anything but uniform: near 1 inside a word or a repeated pattern, near 0 where the text could go many ways. Click a token in the coloured text to see the two distributions there.
α follows the kind of token, not its position. A long chain of thought does not wear a drafter down. Over 1.78 million verification rounds on MATH-500, with DeepSeek-R1-Distill-Qwen-7B as target and two independent 1.5B drafters, acceptance did not fall with position out to 8K tokens under greedy decoding and 12K under sampling, once a greedy repetition pathology was removed; rejections clustered instead on reflection tokens such as "wait", "however" and "check" (Speculative Acceptance Does Not Decay with Position, arXiv 2610.30644). That is the pattern in the coloured text: α drops at choices, wherever they fall.
measured here Text written by Qwen3-1.7B at temperature 1; each token coloured by α = Σ min(p, q) for the Qwen3-0.6B draft at that position, dark green near 1, pale near 0.
With α measured as the mean over the guesses actually examined, the formula predicted the measured tokens per step with a median error of 3% (largest 17%) over all 72 combinations of prompt, temperature and k run here measured here. The catch is that α itself cannot be predicted: it was 0.98 on the list and 0.48 on the story with the same two models. Measure it on a sample of your own traffic; engines report it (section 8).
Because acceptance depends on the text, text can be written to lower it: an adversarial suffix appended to attacker-controlled content (a retrieved page, a shared document) makes drafter and target disagree more often, in some cases until speculative decoding is slower than plain decoding; the suffixes survive sampling and transfer across drafters, and regularising them to keep output quality gives up most of the slowdown (Speedbumps (arXiv 2610.10929)). Per-request acceptance is worth monitoring for that reason too.
A step costs k draft passes plus one target pass over k + 1 tokens. Put the laptop's measured numbers in: the 0.6B draft costs c = 0.26 of a 4B target pass (it is 15% of the target's parameters, not tiny), and checking 5 tokens costs t(5)/t(1) = 2.68. On the story (α around 0.5, k = 4): the model predicts 0.52x at one user, a slow-down. On a list, where the draft is right most of the time: α around 0.98 gives 1.29x. That is why the parent page measured slow-downs on free text and a gain only on a predictable list.
Leviathan et al. assume t(k + 1) = t(1), which gives their speed-up (1 − αk+1) / ((1 − α)(kc + 1)), with c below 0.05 for their T5 drafts (though their own Table 4 gives 0.11 for T5-large). Neither assumption holds on the laptop.
The batch-size crossover. Serve B users at once (how an engine forms those batches is on Batching, KV cache and scheduling in depth) and the verification pass carries B × (k + 1) tokens. The weights are still read once per step, so plain decoding gets cheaper per token as B grows, but the flat part of section 1's curve is used up by the batch itself (Fig. 3): once B tokens fill the arithmetic, every extra guessed token costs real compute, and rejected guesses are pure waste. Speculation trades idle arithmetic for latency, and a full batch has no idle arithmetic.
derived Fig. 3 is the page's H100 cost model (the cost model below, H100 setting, with α 0.8, k 4, draft cost 0.05, context 1,024): Llama 3.1 8B FP8 on one H100, the parent's Capacity planner constants. Not run here. Read it for why the speed-up falls, not for the batch size where it falls: measured crossovers come much earlier (this laptop's runs and the published GPU results, next).
On the laptop the real 0.6B draft (k = 3, measured acceptance length 2.48 on this prompt mix) gave 0.70x the plain server's throughput at 1 user, 0.67x at 4 and 0.54x at 16 users. With llama-server's synthetic acceptance fixing the acceptance length at 4.5, better than any drafter here, the ratio was 0.95x at 1 user, at best 1.16x (8 users) and 0.89x at 16 measured here. This laptop is past the crossover from the first user: checking 4 guesses costs 2.68x a one-token step (section 1), so even 4.5 tokens per step barely repays the drafting. On an H100, where the check is nearly free, the same acceptance length would give a large gain at small batch (the cost model's H100 setting, below).
Two things move the crossover out. Long contexts: every sequence's KV cache is also read each step, a read that grows with batch size times context length, so at long context a big batch is still memory-bound and verification is cheap again; MagicDec reports up to 2.51x for Llama 3.1 8B at batch 32 to 256 on 8x H100 with long contexts (Sadhukhan et al., ICLR 2025, authors). Cheaper drafts and adaptive length: a drafter whose cost does not grow with k (block diffusion), and choosing k per step from the load (TurboSpec, SGLang's adaptive table, vLLM's batch-size schedule, DSpark's per-request verification length) keep the gain at low load and avoid the loss at high load.
A sparse MoE target bends the model. Verifying k + 1 tokens routes them to more experts than one token, so counting activated-expert bytes predicts a speed-up that is poor at batch 1, peaks at a middle batch and then falls. Across 10 MoE models (30B to 1T parameters, 8 to 512 experts, each with its own EAGLE, EAGLE-3 or MTP drafter, k = 3, H100 and B200), coarse-expert models (Mixtral 8x7B, Qwen2-57B) followed that curve, but fine-grained ones (Qwen3-30B, Qwen3-235B, Kimi-K2.5) mostly did best at batch 1: their MoE layers take a smaller share of step time than of weights (MoE kernels use bandwidth better than attention, and L2 absorbs repeated reads of co-routed experts), and draft tokens share experts more than independent routing assumes (Ranjan et al., Cohere, NeurIPS 2026 (arXiv 2610.38981), authors; speed-ups shown only in figures and kernel-dependent). For an MoE target, estimate t(B, k + 1) from measured kernel time, not from expert bytes.
Predict first: on the H100 setting, which moves the crossover further out, a longer context or a larger k?
On the laptop setting the model gets the shape right and the absolute numbers wrong: it leaves out llama-server's per-step overhead (the note above says by how much), so read it for shape. The H100 setting is derived from the parent's Capacity planner constants, not run here.
llama-server (llama.cpp b11146, Metal) serving Qwen3-4B Q4_K_M with 16 slots, and 1, 2, 4, 8 and then 16 closed-loop clients in turn, each sending a different prompt from a mixed pool of 16 (code, explanations, stories, lists), greedy, 192 tokens per answer. Three servers: no draft; the Qwen3-0.6B Q4_K_M draft (--spec-type draft-simple, k = 3, the default); and the same draft under llama-server's --spec-synth-len 4.5 benchmarking mode (k = 4), which runs the real draft but accepts guesses at random so the mean acceptance length is fixed at 4.5 (its output text is not valid). Idle slots do no work, so one 16-slot server serves every user count. The whole sweep ran twice per server; the machine was shared, so the load average is recorded with each run and the spread between the two sweeps is shown.
No. A drafter that attends over the full prefix inherits the target's context cost and its speed-up erodes, then reverses, at ultra-long context, but target-conditioned drafters (EAGLE-style heads) already read the target's hidden states over the whole prefix. Frozen short-context drafters with a bounded attention cache and rotary positions re-based into their trained range kept their short-context speed-up flat from 4k to two million tokens across three target-drafter pairs and five corpora, at a cost of at most 0.16x of speed-up at short length (Long-Context Drafting Does Not Require Long-Context Drafters (arXiv 2610.20865), authors).
Everything so far works with any drafter that proposes tokens and (for sampling) says how likely it thought each one was. It must share the target's tokenizer exactly (vocabulary and ids), or be mapped (EAGLE-3 drafts often use a reduced vocabulary mapped back with a table); same family and same chat template matter for acceptance. Drafters differ in three things: how well they guess (acceptance), what a guess costs (the cost ratio c), and what you have to train or ship. They form a ladder, from no model at all to heads trained into the target itself (Fig. 4; the numbers are acceptance lengths measured on this laptop in Drafters measured).
measured here Acceptance lengths from Drafters measured (llama-server, Qwen3-4B Q4_K_M target, greedy, one run per prompt). Fig. 4's layers and positions are schematic.
A separate 0.6B model has to work out what the 4B model is thinking from the tokens alone. EAGLE's head is handed the 4B model's own hidden state (its summary of everything so far), so its job is much easier: predict what the next feature, and so the next token, will be. That is why a single extra layer can out-guess a separate model several times its size: on Qwen3-4B, the AngelSlim EAGLE-3 head (one layer) reports a mean accepted length of 2.08 with 2 draft tokens on one H20 in vLLM, where plain decoding gives 1 (model card, vendor). The cost: the head only works with the exact target it was trained for, and the engine must pass hidden states from the target to the drafter every step.
MTP takes this one step further: the prediction module is trained with the model, so the model's maker ships the draft (how the module is trained, and what it does to pre-training, is on Families and objectives). DeepSeek-V3 trained one MTP module (depth 1) to improve pre-training and noted it can be "repurposed ... for speculative decoding" (DeepSeek-V3 paper page has a calculator for what 85 to 90% acceptance implies). With one MTP token, a step yields at most 2 tokens; engines chain the module to draft 2 to 4. How the MTP loss is trained moves acceptance too: keeping only the part of each MTP head's gradient that pulls it toward the model's own next-token distribution lengthened acceptance over standard MTP, slightly, at every tested size (167M to 1.2B LLaMA-style models, 1.67 to 1.70 tokens at 1.2B; seeds not reported) (Soft-MTP, arXiv 2610.38331, author).
Block diffusion attacks the other term, the drafting cost. An autoregressive drafter needs k sequential passes for k tokens, so c grows with k; a diffusion drafter writes the block in one pass, so a 16-token draft costs about as much as a 1-token draft. Its weakness is that block positions are guessed without seeing each other (the "suffix decay" DSpark's Markov head tries to fix). The same idea used as the whole model rather than as a drafter is on the DiffusionGemma paper page.
The model as its own drafter, segment by segment. When an output splits into segments that rarely depend on each other, the target can draft them all at once and then check them. WorldTUI, a 358M model that plays a terminal, decodes each changed screen row as its own batch element from the same history and cache, so a frame takes as many steps as its longest row; rows that cannot see each other sometimes disagree, so the same model then verifies the drafted frame sequentially, keeping tokens up to the first disagreement and redrafting the rest. Under greedy decoding a fully verified frame equals sequential output; its optional per-frame time budget, which commits the rest of the draft unchecked when it runs out, gives that exactness up (one author's demo, decoding mode of its headline latency not stated: WorldTUI).
| Drafter | What proposes the tokens | Training needed | Typical strength | Published speed-up (who measured) |
|---|---|---|---|---|
| n-gram / prompt lookup | Copy what followed the last few tokens earlier in the prompt or the output | None | Free to propose; shines when the answer repeats the input (code edits, quoting, summaries) | 2.4x average on summarization and context QA, Mistral-7B, one A100, greedy (Saxena 2023, author); 2.8x on CNN/DailyMail, Llama 3 70B, 4x H100, QPS 1 (vLLM blog, 2024-10-17, vendor) |
| Suffix decoding | A suffix tree over earlier prompts and outputs of many requests, kept in CPU memory; drafts more when its match is long | None | Agent loops that repeat long spans across calls | Up to 5.3x on SWE-Bench and Text-to-SQL agent traces, Llama 3.1 8B, one H100, batch 1 (Oliaro et al., NeurIPS 2025, authors) |
| Separate small model | A smaller model with the same tokenizer (Qwen3-0.6B for Qwen3-4B here) | None, or distil it towards the target (DistillSpec: 10 to 45% more speed-up) | General text; costs a real model's forward passes per guess | 2 to 3x on T5-XXL, one TPU v4, batch 1 (Leviathan et al.); 1.92 to 2.46x on Chinchilla 70B (Chen et al.); 3.55x for Llama 3.3 70B with a 1B draft, one H200, batch 1 (NVIDIA, 2024-12-17, vendor) |
| Medusa heads | Extra output heads on the target's last hidden state, head i guessing the token i steps ahead; candidates combined into a tree | Heads (Medusa-1, target frozen) or heads plus target (Medusa-2) | Cheap guesses with no second model; later heads guess blindly, so acceptance falls fast with depth | Over 2.2x (Medusa-1), 2.3 to 2.8x (Medusa-2), Vicuna 7B to 33B, one A100, batch 1 (Cai et al. 2024, authors) |
| EAGLE, EAGLE-2, EAGLE-3 | A one-layer transformer that reads the target's own hidden features and drafts token by token; EAGLE-2 grows a draft tree shaped by the draft's confidence; EAGLE-3 fuses low, middle and top-layer features and trains on its own earlier guesses ("training-time test") | A small head per target model (published for many open models) | The common default for serving in 2025 and 2026 | EAGLE 2.7 to 3.5x latency on LLaMA2-Chat 70B; EAGLE-2 3.05 to 4.26x; EAGLE-3 up to 6.5x at batch 1, and 1.38x throughput at batch 64 in SGLang on one H100 (EAGLE, EAGLE-2, EAGLE-3, authors) |
| Multi-token prediction (MTP) | Modules trained with the model itself to predict the token after next; at serving time they are the draft | Done in pre-training by the model's maker | Ships inside the checkpoint (DeepSeek-V3, Qwen3-Next, GLM, MiMo, Gemma 4 and others) | DeepSeek-V3: second-token acceptance 85 to 90%, "1.8 times TPS", hardware and batch not given (§5.4.3, authors); DeepSeek-R1 on 8x B200 at batch 1: 2.28x with 3 MTP tokens (TensorRT-LLM blog, vendor); GLM-5's three parameter-sharing MTP layers: acceptance length 2.76 against 2.55 for DeepSeek-V3.2, and with 7 draft steps on GLM-5.1's backbone GLM-5.2's changes raise it from 4.56 to 5.47 (Zhipu: GLM, authors) |
| Block-diffusion drafters (DFlash, DSpark) | A few-layer drafter that reads the target's features and fills a whole block of 7 to 16 masked positions in one forward pass; DSpark adds a small "Markov head" so each position also sees the previous token, and schedules how much of the block to verify per request | A drafter per target model | Drafting cost no longer grows with k, so long drafts become affordable | DFlash: over 6x lossless, up to 2.5x faster than EAGLE-3; Qwen3-4B on Math500 on one B200 4.8x at concurrency 1 falling to 2.9x at 32 (Chen, Liang, Liu, ICML 2026, authors). DSpark: 60 to 85% more per-user speed than MTP-1 at matched throughput in DeepSeek-V4 production (arXiv 2607.05147, authors) |
Every speed-up in this table is the authors' or vendor's own measurement, mostly at batch 1 on datacenter accelerators, against their own baseline. They are not comparable with each other (different models, tasks, hardware and baselines), and none is an independent replication. Part of the published gaps between recipes is their training data: retraining six drafter recipes under shared training and inference conditions, across ten benchmarks and two targets, shrinks gaps "that appear large in published comparisons" substantially (When Does Better Acceptance Pay?, arXiv 2610.24993), and distillation objectives that help a lot when a drafter learns from external responses gain much less once the target regenerates those responses (Target Regeneration Shrinks the Gains of Draft-Training Objectives, arXiv 2610.29013). Compare a new drafter with one trained on target-regenerated data, not with its published number. The same drafters run on one 4B target on this laptop are in Drafters measured.
Across twelve target-drafter pairs, at each training-free relaxed rule's most relaxed setting, verification accepted 1.34x as many tokens per round as the exact rule but completions came out 1.54x longer, mostly longer reasoning, which largely cancelled the gain; the rules that cut verifier rounds typically lost accuracy substantially (Acceptance Is Not Speed (arXiv 2610.23818)). Under a lossy rule, report completion length and verifier rounds beside acceptance length.
Choosing. If the model ships MTP heads, use them. Otherwise an EAGLE-3 head for that exact model if one exists; a same-family small model if not; n-gram or suffix decoding added on top for copy-heavy work (code edits, RAG, agents). Then measure acceptance length and throughput at your real concurrency.
A chain draft dies at its first wrong token. If the draft was unsure between two words, it could propose both and let the target pick: a draft tree. All branches are checked in the same forward pass using a tree attention mask (each candidate token attends only to its own ancestors), introduced by SpecInfer and Medusa, and made adaptive in EAGLE-2, which grows the tree where the draft's confidence (the product of its probabilities along the path) is highest. The target keeps the longest root path it agrees with.
The trade: a tree spends its verification budget on breadth instead of depth. With a budget of M tokens checked per pass, a chain of M goes deep on one guess; a tree of M nodes covers the likely alternatives near the root, where most chains fail.
measured here Real models at temperature 0: draft Qwen3-0.6B (4-bit MLX), target Qwen3-1.7B (4-bit MLX), greedy. Accepted length = the longest root path equal to the target's own greedy continuation; trees capped at depth 6.
Over every 4th position of four prompts (171 positions; trees capped at depth 6), the chain of 8 accepted 3.64 tokens on average and a tree of 8 nodes 3.36; a tree of 16 nodes 3.80 and of 32 nodes 4.01, against 2.23 for a chain of 4 measured here. By prompt (chain of 8 against tree of 8): code edit 3.69 against 3.62; summary 1.69 against 2.10; story 0.89 against 1.39; list 7.42 against 5.75. The tree wins where the draft is unsure (summary, story), because its second and third guesses near the root often hold the target's choice; it loses on the list, where the draft's single chain is almost always right and the tree, capped here at depth 6 and spending nodes on alternatives, cannot reach as deep. The extra nodes are not free: on a GPU at batch 1 they ride in the idle compute, but each node is one more token in the verification pass, which is exactly what a large batch cannot afford (section 5). That is why engines use trees at low concurrency and short chains, or none, at high concurrency.
num_speculative_tokens has no default for a draft model (it must be set); llama.cpp's --spec-draft-n-max defaults to 3. Raise it while acceptance is high and verification is cheap; lower it as the batch grows.draft_sample_method="greedy"), so q is one-hot and a draft token is kept with probability p(token). llama.cpp also drafts greedily and can stop a draft early when the draft's top probability falls below --spec-draft-p-min (default 0).vllm:spec_decode_num_drafts_total, ..._num_draft_tokens_total, ..._num_accepted_tokens_total and accepted tokens per position on /metrics (acceptance length = 1 + accepted / drafts; v1/spec_decode/metrics.py); llama-server returns draft_n and draft_n_accepted per request.How vLLM's scheduler counts draft tokens as ordinary tokens to compute (num_tokens_with_spec), which speculative methods its Model Runner V2 does not support yet, and its per-request acceptance metrics are on vLLM: inside the default engine. SGLang's scheduler, including the overlap scheduler its speculative workers run inside, is explained on SGLang: radix cache, cache-aware scheduling, large-scale serving.
Y = in the serving path; legacy = only in an older backend; example = a separate example program, not the server.
| Method | vLLM v0.31.0 | SGLang v0.5.21 | TensorRT-LLM v1.2.1 | llama.cpp b11146 | mlx-lm 0.32.0 |
|---|---|---|---|---|---|
| Separate draft model | Y draft_model | Y STANDALONE | Y draft/target | Y draft-simple | Y (server stops batching) |
| EAGLE / EAGLE-3 | Y eagle, eagle3 | Y | Y EAGLE 3 | Y draft-eagle3 | no |
| Medusa | Y (removed, with the MLP speculator, in v0.33.0 on 2 November 2026) | no | legacy | no | no |
| MTP | Y (27 model types) | Y (NEXTN is an alias of EAGLE) | Y (DeepSeek only) | Y draft-mtp | no (MTP weights dropped on load) |
| n-gram / prompt lookup | Y ngram, ngram_gpu | Y | Y | Y (5 variants) | no |
| Suffix decoding | Y (imports Arctic Inference) | no | no | no | no |
| DFlash | Y | Y | no | Y draft-dflash | no |
| DSpark | Y | Y | no | Y draft-dspark | no |
| Lookahead (Jacobi) | no | no | legacy | example | no |
| Verification rule at T > 0 | min(1, p/q) with residual | tree verification in an sgl-kernel sampling kernel, tree_speculative_sampling_target_only (kernel not read here) | docs say greedy only; code adds non-greedy for two-model paths | sample target, accept if equal | sample target, accept if equal |
| Turn off at large batch | opt-in schedule num_speculative_tokens_per_batch_size (k may be 0) | opt-in adaptive config: k = 0 at batch 64 | max_concurrency, draft_len_schedule | no (per slot) | no |
Sources: vLLM config/speculative.py (methods L39 to L84; greedy draft sampling default L601; batch-size schedule L492) and v1/sample/rejection_sampler.py (accept test L884, residual L1061); SGLang speculative/spec_info.py and adaptive_spec_params.py; TensorRT-LLM speculative-decoding.md and llmapi/llm_args.py (the doc and the code disagree at the same tag; both shown); llama.cpp common/sampling.cpp and common/speculative.cpp; mlx-lm 0.32.0 generate.py (speculative_generate_step) and server.py (is_batchable = draft_model is None). All read 2026-10-08.
speculators library for training and packaging drafts (speculators).Every kind of drafter llama.cpp can run, on one target and six kinds of prompt, on the same laptop: a separate small model, an EAGLE-3 head, two block-diffusion drafters (DFlash and DSpark) and five n-gram modes. Read Reading section 6 first for what each drafter is.
All runs are greedy, so drafted and accepted counts repeat exactly from run to run (checked on two drafters run twice), and in exact arithmetic the text would equal the plain server's. It did not always: answer lengths differed from the plain server's for summarise an article with some drafter, the same floating-point effect as in Reading section 3 (a k + 1 token verification pass rounds differently from a 1-token step).
What it means. Model-free n-gram drafting was the clear winner wherever the answer copies the prompt (code edits, quoting), because its guesses cost nothing to make and are long; on fresh prose it finds nothing to copy and costs almost nothing either. The trained drafters guessed far better on prose than any n-gram, and DFlash's block of 16 was accepted 10 to 12 tokens at a time on code and lists, which is the only place its one-pass draft paid. EAGLE-3 and DSpark kept their acceptance but lost speed: on this GPU every drafted token makes the 4-bit target's verification pass costlier (Reading section 1), and the drafters run in 16-bit. This ranking is for one laptop GPU at batch 1, and it is not the datacenter ranking: on an H100, where checking 8 to 16 tokens is nearly free, the published results in Reading section 6 put EAGLE-3 and DFlash far ahead of n-gram on general text.
Commands: llama-server -m Qwen3-4B-Q4_K_M.gguf -ngl 99 -fa on -np 1 -c 4096 plus the flags in the table; client: llama-server's /completion, temperature 0, cache_prompt off, each prompt once. llama-server's own timings give tokens per second of generation (predicted_per_second) and drafted and accepted counts. Acceptance length = generated tokens / (generated tokens − accepted guesses), the mean tokens per target pass. Not run here: Medusa (no llama.cpp support), MTP (Qwen3 checkpoints have no MTP heads; llama.cpp's draft-mtp needs a model that ships them), suffix decoding (vLLM only), and any GPU datacenter engine.
The tabs of this page, the knowledge base pages it leans on, the papers behind each drafter and the best outside resources, each with an approximate time. Links checked on 2026-10-08; this page's times measured 2026-11-12.
From why checking guesses is nearly free to the acceptance rule (with your own p and q and the exactness test), tokens per step, the cost model and the batch-size crossover (with a movable cost model), every drafter, trees and the production knobs. 36 min, plus 8 in closed details
One Qwen3-4B target with a 0.6B draft model, EAGLE-3, DFlash, DSpark and five n-gram modes, on six kinds of prompt, every run with its command. 5 min
The whole serving picture; its section 3 sets speculative decoding beside every other serving lever, and section 8 among the ways to make a token cheaper. Reading: 34 min, plus 3 in closed details
The first speculative runs on this laptop (k sweep in llama.cpp and MLX, the k = 6 mismatch) and a cost-model calculator. section about 5 min
The step-time model whose constants this page's H100 curve reuses. 29 min
The scheduler and KV manager that the draft tokens flow through, Model Runner V2's unsupported speculative methods, per-request acceptance metrics. Reading: 41 min, plus 15 in closed details
The radix cache, cache-aware scheduling and the overlap scheduler its speculative workers run inside. Reading: 34 min, plus 16 in closed details
Why batch size moves a step from memory-bound to compute-bound. Reading: 37 min, plus 21 in closed details
llama-server and MLX in depth, the engines used here. Reading: 41 min, plus 49 in closed details
TensorRT-LLM and Dynamo, where MTP and EAGLE run at scale. Reading: 41 min, plus 21 in closed details
Load testing honestly, which is how a speculative speed-up should be checked. Reading: 34 min, plus 13 in closed details
Temperature, top-k, top-p and min-p, which define the p the rule preserves; the rule in its decoding context. Reading: 22 min, plus 4 in closed details
How to train a draft that agrees with its target. Reading: 25 min, plus 8 in closed details
A speculative decoding calculator with Gemma 4's drafter that reproduces Leviathan et al.'s Table 4. calculator 30 min
How multi-token prediction modules are trained, measured at equal tokens and equal compute; this page uses them as drafters. Reading 34 min, plus 14 in closed details
Multi-token prediction in training, and what 85 to 90% acceptance implies. MTP section 26 min
Block diffusion as the whole model, tokens per pass against speculative decoding's 3 to 6. 24 min
The week's DiffusionGemma story: about 1,500 tokens a second on one H100 from 256-token blocks refined in parallel. 5 min
FLOPs and bytes per token, arithmetic intensity, the roofline behind section 1. 24 min
Why bandwidth, not arithmetic, sets decode speed. Reading: 27 min, plus 9 in closed details
The rule, α, tokens per run, the cost coefficient c and the walltime formula. Read sections 2 and 3. 40 min
The same rule found independently at DeepMind, on Chinchilla 70B. 20 min
Blockwise parallel decoding, the greedy ancestor of draft-and-verify. 25 min
Token trees and tree attention for verification. 40 min
Extra heads, tree candidates, typical acceptance. 35 min
Feature-level drafting, dynamic trees, training-time test; EAGLE-3 Tables 3 and 5 give throughput by batch size. 1 h for all three
Exact parallel decoding with Jacobi iterations and no draft model. 30 min
Suffix trees over past requests for agent workloads. 30 min
Why speculation helps again at large batch when contexts are long. 35 min
Choosing k per step from load: goodput-based control in vLLM. 30 min
Distilling the draft towards the target. 30 min
Block-diffusion drafting; Table 3 gives speed-up against concurrency on B200. 35 min
Semi-autoregressive blocks and per-request verification length, from DeepSeek-V4 production. 40 min
Every drafter type in llama-server, with conversion commands. 15 min
Gains at QPS 1 and slowdowns at high QPS, in one post. 10 min
Supported methods and their limits. 10 min
A clear measured account of n-gram speed-up shrinking with batch size. 15 min
DeepSeek V3 with MTP at small and large batch. 10 min
The n-gram trick in twenty lines of Python. 5 min