Multi-Token Prediction Draft Models: How Speculative Decoding Accelerates LLM Inference and How to Engineer It
Speculative decoding turns sequential LLM generation into parallel verification to overcome the memory-bound nature of the decode phase. This article explains how multi-token prediction (MTP) draft models enable it, covering the core draft-and-verify workflow, lossless acceptance criteria, and three key draft-model designs (target activations, KV cache sharing, and an efficient embedder). It also walks through the engineering realities of deployment — batch-size effects, acceptance-rate monitoring, memory budgets, sampling consistency, and time-to-first-token — along with illustrative pseudocode, deployment advice, and common pitfalls. The goal is to help developers turn benchmark speedups into stable production throughput gains.
一、Why Multi-Token Prediction Draft Models Are Needed
LLM inference splits into two phases:
- Prefill: The model processes all input tokens in a single pass. This is a matrix-matrix multiplication with high arithmetic intensity, so it is compute-intensive.
- Decode: The model generates one new token at a time, reading all weights from memory before performing a matrix-vector multiplication with a single token vector. The arithmetic intensity here is extremely low.
Take a mainstream 7B-class model (FP16) as an example: the weights require about 14 GB of memory. Generating a single token requires reading all the weights corresponding to roughly 28 GFLOP, while the actual compute is only about 0.014 GFLOP — utilization below 0.1%. The decode phase therefore becomes a memory-bound process in which “compute waits on data.” On a single GPU/TPU, compute typically exceeds memory bandwidth by one to two orders of magnitude, so upgrading hardware specs alone cannot fundamentally solve the problem.
Common industry responses include weight quantization, KV cache compression, paged caching, and continuous batching. They reduce memory traffic or improve hardware utilization, but they cannot change the sequential nature of “one forward pass produces only one token.” Speculative decoding was proposed precisely against this backdrop: it does not change the model’s mathematical definition, but instead turns sequential generation into parallel verification through “parallel guessing + a single check.”
As of May 2026, a representative approach in the industry is to ship a set of lightweight multi-token prediction (MTP) draft models alongside an open-source large model. The main model cooperates with them to perform speculative decoding, with publicly reported inference speedups reaching up to about 3x. This approach is worth a careful engineering breakdown.
二、The Core Idea of Speculative Decoding
Speculative decoding alternates between two stages — draft and verify:
- Draft stage: A draft model (or a draft head attached to the model) with far lower compute cost than the main model autoregressively generates several candidate tokens — for example, K of them.
- Verify stage: These K candidate tokens are appended to the main model’s input sequence, and the main model — in a single forward pass — obtains the next-token probability distribution at every position. This one pass is what generating a single token would require anyway.
- Accept/reject: Compare each candidate token against the main model’s distribution to decide whether to accept, reject, or replace it, and grant one extra token generated by the main model in each round.
The key here is: trade a little more compute for bandwidth. Verifying K candidate tokens requires roughly K times the arithmetic of generating one token, but the weights are moved from memory only once. As long as K is chosen well, this extra compute can be absorbed by spare compute, and the weight-movement time saved translates directly into lower latency.
2.1 Acceptance Criteria and “Lossless” Quality
Let the draft model’s distribution at position t be q(·), the main model’s distribution be p(·), and the sampled token be x.
- Greedy decoding: The highest-probability token from the main model at position t is the correct answer; the draft token is accepted if it matches and rejected otherwise.
- Stochastic sampling: Accept the draft token with probability min(1, p(x) / q(x)); on rejection, resample from the normalized residual distribution max(0, p(x) − q(x)).
Both guarantee mathematically that the output distribution is exactly the same as using the main model directly — which is what “no loss of generation quality” really means. It is worth stressing that speculative decoding only changes generation speed; it does not improve the model’s knowledge, reasoning ability, or context length.
2.2 Engineering Refinement of the Acceptance Criteria
The validation strategy of a real system can be summarized in three points:
- Full acceptance: The main model fully endorses all K draft tokens, adopting them all at once and gaining one extra token from the main model. This round produces K+1 tokens at roughly the cost of a single forward pass.
- Partial acceptance: On a mismatch, accept up to the first inconsistent token; the rejected position is replaced by the main model’s own prediction, and all subsequent draft tokens are discarded, avoiding “guilt by association” continuation of errors.
- Length constraint: Draft length is a tunable knob between latency and acceptance rate. A longer draft yields more gain when the hit rate is high, but once rejected midway, all the draft compute for the remaining tokens is wasted.
三、Three Key Designs of the Draft Model
A naive draft model often fails to reach the ideal hit rate. The industry approach is built around “make the draft more like the main model while keeping the draft cheap,” through three techniques:
3.1 Target Activations
Let the draft model directly reuse the main model’s context information: concatenate the embedding of the main model’s last-layer output with the draft model’s token embedding, then project it onto the draft model’s hidden dimension as the draft model’s input. In MTP’s multi-round prediction, subsequent rounds also concatenate the draft model’s own previous output.
The point is that the draft model no longer needs to maintain a “understanding” parallel to the main model; instead it takes the main model’s deep semantics as a condition. Its task is simplified to “guessing the next few tokens on the basis of the context the main model already knows.” In practice, this is far more stable than having the draft model build its understanding independently.
3.2 KV Cache Sharing
The draft model directly reuses the main model’s KV cache, avoiding repeated computation:
- Local (sliding-window) attention layers: reuse the main model’s most recent local KV cache;
- Global attention layers: connect to the main model’s last-layer global KV cache.
After sharing, the draft model’s attention computation needs almost no additional memory reads/writes, driving draft-stage latency extremely low — and draft-stage latency is exactly what determines whether speculative decoding nets a profit.
3.3 Efficient Embedder
One of the main bottlenecks of on-device models is the LM head (output layer) full-vocabulary matrix multiplication: the vocabulary is often on the order of a hundred thousand, and every generation computes a V×d matrix-vector multiplication. The efficient embedder idea clusters and groups token embeddings, uses each cluster’s representative embedding for coarse screening, then does precise comparison within the candidate range. Its essence is to replace an O(V) enumeration with “a few representative points + local re-ranking,” substantially reducing per-decode memory access and compute on-device.
四、From Principle to Practice: Key Engineering Issues
4.1 Speedup vs. Batch Size
The gains of speculative decoding are most obvious in low-concurrency, single-request scenarios, where weight movement dominates and compute is largely idle. When batch size is large and the model has entered the compute-intensive regime, the extra compute of verifying K tokens competes with normal decoding for compute, and the gains are significantly diluted or even turn negative.
The conclusion: don’t use one fixed draft length for everything. A more robust approach is to dynamically decide the draft length based on batch size, sequence length, and current hardware utilization, or simply fall back to ordinary decoding in high-concurrency scenarios.
4.2 Acceptance Rate Is the Metric Worth Watching
Key metrics to monitor:
- Average acceptance length (average tokens produced per round);
- Draft acceptance rate (accepted tokens / total draft tokens);
- Share of time spent in the draft stage.
An average acceptance length near 1 means the draft is doing almost nothing; in that case, first check whether the input format matches and whether the context is being passed correctly. A common problem in practice: the draft model and main model handle the system prompt, template symbols, or special tokens differently, causing the acceptance rate to drop off a cliff.
4.3 Memory Budget
The draft model is lightweight but still consumes memory; if you don’t allocate a separate KV cache for it and instead fully share the main model’s cache, ensure the read/write semantics along the sharing path are correct (especially the trimming boundaries of sliding-window layers), otherwise you get a hidden bug where “it’s faster but the output drifts.”
4.4 Sampling Consistency
If the business side uses top-p, top-k, temperature, or structured-output constraints, be sure to confirm that the validation path is exactly the same as the main model’s original sampling path. Once the validation path approximates during sampling (for example, only comparing argmax), the output distribution changes quietly, and the premise of “lossless” no longer holds.
4.5 Long Context and Time-to-First-Token
Speculative decoding does not change prefill’s compute; time-to-first-token (TTFT) is mainly determined by input length and will not decrease because of the draft model. What truly benefits is per-request output throughput and end-to-end latency. For long-context scenarios, whether the draft model can correctly use the main model’s deep state often matters more than the draft model’s parameter count.
4.6 Working with the Inference Serving Stack
In engineering, the draft model is typically plugged in as an independent front-end inference unit:
- The scheduling layer judges the current batch size and queue length to decide whether to enable speculative decoding;
- Per-request timeout budgets need to count “rejected drafts” into worst-case latency;
- Logging and monitoring should separately expose the draft model’s and main model’s latency, throughput, and acceptance rate, making bottlenecks easier to locate.
五、Illustrative Code
def mtp_decode(target, draft, prompt, gamma=4, max_new=256):# prompt is the main model's context; draft and target share the KV cachelogits_list, token_list = target.prefill(prompt)n = 0while n < max_new:# 1) Draft stage: based on the main model's last-layer output + draft model input,# predict gamma candidate tokens in parallelcands = draft.mtp_predict(logits_list, token_list, gamma)# 2) Verify stage: a single forward pass scores all candidates in parallellogits_list, token_list = target.forward(cands)# 3) Position-by-position check: accept up to the first mismatchaccept = 0for c in cands:if target.greedy_token(logits_list, c) == c:accept += 1else:break# 4) On full acceptance, gain one extra main-model token;# on partial acceptance, the rejected position is replaced by the main model's predictionyield from cands[:accept]if accept < len(cands):logits_list, token_list = target.rollback(accept)n += acceptreturn
The above is illustrative pseudocode; a real implementation must fit the scheduling, cache management, and sampling strategy of the specific inference framework.
六、Deployment and Optimization Advice
On the cloud, the draft model can be treated as an optional component of the inference service: model weights are stored in object storage, the service runs on a container platform or GPU instances, and monitoring/alerting and logging services observe changes in acceptance rate, time-to-first-token, and throughput. Before enabling it, run a baseline comparison with real business data to measure gains rather than relying only on public benchmark numbers.
If you implement or integrate such a scheme yourself, proceed in this order:
- First get naive speculative decoding working, confirming the main model output matches the baseline;
- Then add target activations and observe changes in acceptance length;
- Finally introduce KV cache sharing and the efficient embedder to compress draft-stage overhead.
At each step, run A/B comparisons on the same batch of requests to avoid mistaking an “implementation bug” for “the method doesn’t work.”
七、Common Misconceptions
- Thinking it improves model capability: It only affects speed. Problems the model gets wrong, speculative decoding still gets wrong.
- Blindly increasing draft length: A longer draft isn’t necessarily faster; the compute for rejected parts is pure waste.
- Ignoring concurrency effects: Gains shrink under high concurrency, so a dynamic strategy is needed rather than a static switch.
- Interpreting “lossless” as “byte-for-byte identical results”: Lossless means the output distribution is consistent. Implementation details such as floating-point accumulation order and parallel reduction methods may produce tiny differences in individual samples; this is a numerical-implementation issue, not a flaw in the method itself.
八、Conclusion
The value of multi-token prediction draft models lies in achieving certain inference speedup at modest engineering cost: the draft model “guesses,” the main model “judges,” and the right to judge always stays with the main model, so the quality boundary is clear and risk is controllable. For developers, the real difficulty is not the principle but the details — scheduling draft length, consistency of the sampling path, correctness of cache sharing, and whether monitoring metrics can surface problems in time. Get these engineering details solid, and speculative decoding can go from a “benchmark speedup” to “stable throughput gains in production.”
