Multi-Token Prediction and Speculative Decoding: A Deep Dive into Faster LLM Inference
Multi-token prediction and speculative decoding accelerate large language model inference by combining lightweight draft generation with parallel verification by a target model. This article explains the workflow, acceptance and fallback logic, and optimizations such as target-activation concatenation, KV cache sharing, and efficient embedding representations. It also covers the deployment trade-offs that determine whether these techniques deliver practical latency and throughput gains.
1. Why LLM Inference Needs Acceleration
Autoregressive generation is the standard approach to large language model inference. At each step, the model generates one token, appends it to the input sequence, and runs another forward pass to produce the next token. This sequential process creates two important engineering constraints.
First, memory bandwidth often becomes the main bottleneck. Large models contain billions or even hundreds of billions of parameters. During decoding, generating each token requires accessing the model’s weights in accelerator memory. Compute capacity has grown faster than memory bandwidth, leaving compute units waiting for data rather than performing useful work. In bandwidth-bound, single-token decoding workloads, effective GPU compute utilization can fall to single-digit percentages.
Second, sequential decoding limits parallel computation across generated positions. A forward pass can process multiple token positions in parallel when those tokens are already available. Standard autoregressive generation cannot fully exploit this capability because each new token depends on the preceding output.
Multi-token prediction (MTP) and speculative decoding address these constraints through a shared idea: let a lightweight model propose several tokens, then let the full target model verify them in one pass.
The aim is to replace repeated target-model decoding steps with a pipeline of fast drafting and parallel verification.
2. How Speculative Decoding Works
Speculative decoding involves two components: a lightweight draft model and a full-capability target model.
2.1 Drafting: Propose Multiple Candidate Tokens
The draft model is substantially smaller than the target model. It typically uses a compatible vocabulary and tokenizer so that its candidate tokens can be passed directly to the target model.
In the MTP-based approach discussed here, the draft model predicts several upcoming tokens, producing a short draft sequence. Depending on the architecture, this can involve parallel prediction heads or a chain of lightweight prediction steps. Speculative decoding itself does not require all draft tokens to be generated simultaneously.
Because the draft model is small, proposing several tokens can take less time than a single target-model decoding step.
2.2 Verification: Check the Draft in One Target-Model Pass
The target model processes the candidate sequence together with the existing context. With causal attention, it can compute the predictions needed to verify the draft positions within a single forward pass.
This is the main source of acceleration. In a memory-bandwidth-bound workload, verifying several candidate tokens can cost much less than generating the same number through separate target-model passes. Processing more positions makes better use of weights that have already been loaded.
However, verifying (K) tokens is not universally as fast as processing one token. The actual cost depends on the draft length, context length, hardware, and workload.
2.3 Acceptance and Fallback
The verification results determine how much of the draft is retained:
- Full acceptance: If every candidate passes verification, the entire draft is accepted. The target model can also supply one additional token, allowing the iteration to advance by more than the draft length.
- Partial acceptance: If a candidate fails verification, only the tokens before that position are retained. A replacement token is selected at the rejected position, and all later draft tokens are discarded. Drafting then resumes from the updated sequence.
A central property of exact speculative decoding is that the target model’s output distribution governs acceptance and correction.
For greedy decoding, verification can be understood as checking whether each candidate matches the target model’s preferred token. For sampling, preserving the target distribution requires the appropriate probability-based acceptance and correction procedure; a simple token-by-token comparison is not sufficient.
With a correct exact implementation, speculative decoding preserves the target model’s output distribution. Draft quality therefore affects efficiency rather than the underlying generation distribution. This does not necessarily mean that separate sampled runs produce identical text.
2.4 Pseudocode
The following sketch illustrates the drafting, verification, and prefix-acceptance workflow. The comparison is a conceptual simplification, not a complete distribution-preserving sampling implementation.
while not finished:# 1. Propose K candidate tokens with the draft modeldraft_tokens = draft_model.generate(prefix, num_tokens=K)# 2. Verify all candidates in one target-model forward passlogits = target_model.forward(prefix + draft_tokens)# 3. Find the first mismatch; accepted length t satisfies 0 <= t <= Kaccepted = compare(logits, draft_tokens)# 4. Keep the accepted prefix and select a correction or bonus tokenoutput += draft_tokens[:accepted] + [sample(logits[accepted])]
In a complete implementation, the accepted output must also become the prefix for the next iteration, and the caches must be updated accordingly.
3. Three Techniques for More Accurate, Efficient Drafting
The practical benefit of speculative decoding depends heavily on draft acceptance. The more useful tokens each verification pass accepts, the fewer expensive target-model passes are needed.
MTP-based draft architectures can improve this balance through several optimizations.
3.1 Target-Activation Concatenation
A draft model can make more accurate predictions by using intermediate representations from the target model.
One approach concatenates the target model’s final-layer hidden representation with the draft model’s current token embedding. A projection layer then maps the combined representation to the draft model’s hidden dimension.
This gives the draft model access to semantic information already computed by the target model, rather than requiring it to reconstruct that information using only its own smaller network. The result can be better alignment with the target model and a higher acceptance rate.
In chained MTP designs, later prediction steps can also incorporate the draft model’s output from the preceding step, passing information through successive predictions.
This is an architectural optimization, not a requirement for every speculative decoding system.
3.2 KV Cache Sharing
Computing a separate key-value cache for the entire context can add substantial overhead to drafting. Architectures designed for cache sharing allow the draft model to reuse compatible KV representations already computed by the target model.
A possible arrangement distinguishes between local and global attention:
- Local attention layers: Reuse the target model’s recent local KV cache, covering the relevant sliding-window context.
- Global attention layers: Access a compatible global KV cache from the target model’s final layer to retain information from the full history.
This reduces redundant computation and lets the draft and target components work from closely aligned contextual information.
However, cross-model KV reuse requires explicit architectural compatibility. Similar model structures alone do not guarantee that cached keys and values can be shared directly.
3.3 Efficient Embedding and Output Representations
On resource-constrained devices, the language-model output head can become a significant source of computation and memory traffic. A vocabulary containing hundreds of thousands of tokens requires a large output projection, which can be expensive even for a small draft model.
One optimization strategy groups token embeddings into clusters:
- Cluster tokens with similar embedding representations.
- Use representative vectors to reduce the amount of projection work.
- Recover or refine token-level results when needed.
The objective is to reduce the effective cost of vocabulary-related computation rather than repeatedly processing the full representation at the same cost.
Such techniques can be especially valuable for on-device draft models, where limited memory bandwidth and compute resources make drafting overhead particularly important. Their usefulness depends on the implementation and on how well the resulting draft distribution aligns with the target model.
4. Engineering Considerations
4.1 Tune the Draft Length
A larger draft length, (K), does not automatically produce greater acceleration.
Longer drafts offer more potential progress per verification pass, but later candidate tokens are more likely to be rejected. Excessive drafting can therefore increase wasted work and slow the system down.
Benchmark a range of draft lengths on the intended hardware using representative application data. The goal is to find the best balance between drafting cost, verification cost, and accepted tokens per iteration.
4.2 Align the Draft and Target Models
Direct token-level verification generally requires compatible tokenization and vocabulary.
More tightly integrated optimizations impose additional requirements. Activation concatenation needs compatible representation interfaces and projection layers. KV cache sharing requires compatible attention structures, dimensions, and cache layouts.
These requirements should be established during architecture and integration work rather than assumed from superficial similarity between models.
4.3 Monitor Acceptance in Production
Acceptance rate and average accepted draft length are central operational metrics. They indicate whether the draft model remains well matched to the application’s current input and output distribution.
If acceptance remains low, application-specific distillation or fine-tuning may help the draft model better approximate the target model’s behavior.
Acceptance should also be evaluated alongside end-to-end latency: a high acceptance rate is useful only if drafting and verification remain inexpensive enough to produce a net gain.
4.4 Reassess Benefits Under Batching
Speculative decoding is often most attractive for low-concurrency, latency-sensitive requests, where single-token decoding leaves substantial hardware capacity unused.
At high concurrency, batching already improves weight reuse and hardware utilization. Drafting and verification then compete with other requests for compute and memory bandwidth, potentially reducing the incremental benefit.
Measure performance under the actual serving workload rather than extrapolating from single-request benchmarks.
4.5 Choose a Compatible Deployment Setup
A small draft model can be deployed alongside the target model, but the serving framework must support the intended speculative decoding method.
Major inference frameworks provide speculative decoding support, although supported draft architectures and optimizations vary. Cloud container platforms, model-serving infrastructure, and monitoring systems can host the pipeline without changing its core design.
Integrated features such as activation sharing or cross-model KV reuse still require specific support in the model architecture and inference runtime.
5. Conclusion
Multi-token prediction and speculative decoding offer a practical way to accelerate LLM generation: use a lightweight component to propose several tokens, then verify those candidates through a single target-model pass.
Target-activation concatenation, KV cache sharing, and efficient vocabulary representations can further improve drafting accuracy and reduce overhead. With an exact acceptance and correction procedure, the acceleration does not require changing the target model’s output distribution.
The source approach points to generation speedups of roughly 3× as an achievable outcome in suitable edge and cloud configurations—not a universal guarantee. Actual gains depend on draft quality, draft length, hardware, context length, batching, and implementation details.
For developers facing inference latency and cost constraints, the key is to evaluate the complete pipeline: how cheaply candidates are produced, how many survive verification, and how effectively each target-model pass advances generation.
