Speculative Decoding for LLM Inference: Draft Model Design and Key Trade-Offs
Draft models accelerate large language model inference by proposing tokens that a larger target model can verify in parallel. This article explains the speculative decoding workflow, the conditions for preserving the target model’s output distribution, and the trade-offs between draft model size, acceptance rate, and verification cost. It also covers training strategies, deployment architectures, batching, cache management, and emerging directions in collaborative inference.
1. Why Autoregressive Decoding Limits LLM Inference
Most large language models (LLMs) generate text autoregressively: the model produces one token, appends it to the input sequence, and then performs another forward pass to generate the next token. This process creates several structural bottlenecks:
- Sequential dependencies: Each decoding step depends on the previous step. Simply adding more parallel compute cannot eliminate this dependency or proportionally reduce wall-clock latency.
- Memory-intensive execution: At small batch sizes, decoding often performs relatively little computation compared with the volume of model data moved from GPU memory. Performance becomes memory-bandwidth-bound, leaving much of the GPU’s compute capacity underused.
- Accumulating latency: Generating N tokens normally requires N sequential decoding passes. Longer outputs therefore accumulate latency, limiting responsiveness in interactive applications.
These constraints become more pronounced as models grow to tens or hundreds of billions of parameters. Quantization and operator fusion remain important, but they do not remove the sequential structure of autoregressive generation.
Speculative decoding addresses this problem by introducing a smaller, faster draft model that proposes tokens for a larger target model to verify.
2. How Draft Models Enable Speculative Decoding
The central idea is to let a lightweight model do inexpensive speculative work while reserving the target model for parallel verification.
Instead of asking the target model to generate every token sequentially, the draft model first proposes a sequence of tokens. The target model then evaluates those proposals in one forward pass. When several consecutive proposals are accepted, the system advances by multiple tokens without requiring a separate target-model decoding pass for each one.
2.1 The Execution Workflow
A standard speculative decoding iteration follows four stages:
- Generate a draft. Given the current context, the draft model autoregressively proposes K candidate tokens.
- Verify the candidates. The target model processes the draft sequence in a single forward pass, computing the conditional probability distributions needed to evaluate the proposed tokens across their positions.
- Accept or reject tokens in order. The system checks candidates sequentially until a rejection occurs:
- In greedy decoding, a proposed token can be accepted when it matches the target model’s highest-probability token.
- In distribution-preserving sampling, acceptance uses a probability-based rule involving both models’ distributions. A rejected token is replaced through corrective sampling, and the remaining draft suffix is discarded.
- Commit the result and update caches. Accepted tokens and any replacement token become part of the generated output. The system retains valid KV cache entries, discards invalid speculative states, and begins the next iteration.
The distinction between greedy verification and probabilistic acceptance is important: checking only whether the models’ highest-probability tokens match is not sufficient to preserve a sampled output distribution.
2.2 Understanding the Performance Benefit
The main performance metric is how many output tokens the system commits per target-model verification pass, relative to the cost of drafting and verification.
A simple planning approximation is to multiply the draft length K by an acceptance rate p. With K = 4 and p = 0.7, this gives 2.8 accepted draft tokens per iteration. If that were the observed average, target-model calls per output token would fall to roughly 36% of the one-token-at-a-time baseline, before accounting for draft-model overhead.
However, K × p is not a general formula for the expected accepted prefix length. Verification stops at the first rejected token, so the result depends on conditional acceptance probabilities across positions and on the decoding algorithm’s treatment of replacement or additional tokens.
The practical benefit therefore depends on more than the average acceptance rate:
- How quickly the draft model produces candidates.
- How many consecutive candidates are accepted.
- How much verification costs relative to a standard decoding step.
- How much scheduling, communication, and cache-management overhead the system introduces.
Speculative decoding improves performance when the cost of drafting and verification is lower than the target-model decoding work it replaces.
2.3 When Speculative Decoding Is Lossless
With the appropriate acceptance rule and corrective sampling procedure, speculative decoding can preserve the same output distribution as sampling directly from the target model.
If a draft token is rejected, the correction procedure samples from an adjusted distribution that compensates for the proposal and acceptance process. This restores the target model’s intended token probabilities.
The guarantee applies to a correctly implemented distribution-preserving algorithm, not to every draft-and-verify heuristic. It also means distributional equivalence, rather than an assurance that two runs will produce identical text.
For developers, the key benefit is that inference can become faster without deliberately trading away the target model’s generation quality.
3. Draft Model Design and Training
The draft model is central to speculative decoding efficiency. Its design must balance proposal speed against agreement with the target model.
3.1 Model Size and Architecture
A draft model is typically a fraction of the target model’s size, ranging from a few percent to a substantially larger share.
Smaller models are cheaper to run but may produce fewer acceptable candidates. Larger models may improve agreement, but their generation latency can consume the savings from reduced target-model decoding.
Common architectural options include:
- Smaller models from the same architectural family: Transformers with fewer layers or narrower hidden dimensions can retain compatible tokenization and similar positional encoding schemes. Architectural similarity can also simplify initialization and alignment.
- Lightweight heads or shallow networks: MLP-based components or a small number of attention layers can operate on shared embeddings or representations. These approaches are useful when the target model already provides much of the required semantic information, although they depend on the surrounding architecture.
- Independent small language models: A model can be trained from scratch or initialized from a generally pretrained checkpoint, then distilled to better match the target model’s outputs.
The right choice is not necessarily the draft model with the best standalone language-modeling performance. It is the model that delivers the best end-to-end speedup under the intended workload.
3.2 Training Objectives and Knowledge Distillation
Draft-model training should emphasize agreement with the target model rather than perplexity alone.
Useful strategies include:
- Distribution distillation: Train on token-level soft labels from the target model, using a loss such as KL divergence to bring the draft distribution closer to the target distribution.
- Sequence-level consistency: Include generated sequences and sequence-level evaluation so that training reflects the effects of multi-step drafting, rather than optimizing only isolated next-token predictions.
- Acceptance-rate feedback: Measure actual acceptance during evaluation and use it to guide training and inference configuration, including proposal temperature and truncation settings.
Acceptance rate is valuable, but it should not be optimized in isolation. A more accurate draft model is only beneficial if its additional cost does not outweigh the reduction in target-model work.
3.3 Coordinating Draft Length and Sampling
Longer drafts are not always better.
Increasing K adds sequential work for the draft model and increases the amount of speculative state processed during verification. If an early token is rejected, later proposals are discarded, wasting part of that work.
A draft length of 4–8 tokens can serve as an engineering starting point, with dynamic adjustment based on observed acceptance and latency.
Draft sampling also affects efficiency. Lower-temperature or greedy proposals can make candidate sequences more predictable, while the target model’s configured sampling distribution determines the intended output randomness.
These settings can be tuned separately, but distribution-preserving verification must correctly account for the proposal distribution actually used. Changing the draft strategy does not remove the need for valid acceptance and correction logic.
4. Integrating Draft Models into Inference Services
Production deployment requires coordination across model placement, request scheduling, memory management, and hardware execution.
4.1 Model Placement and Deployment Architecture
Draft and target models have different compute and memory requirements. Deployment should account for those differences rather than assuming that one placement strategy is always best.
Options include:
- Co-locating both models on the same GPU: This can reduce cross-device communication, provided sufficient memory and compute resources are available.
- Running the draft model on a CPU and the target model on a GPU: This may suit very small draft models, but CPU latency and host–device synchronization must be measured carefully.
- Using multiple draft-model instances with one target-model instance: Different instances can support different request types, draft lengths, or proposal strategies. Any throughput benefit depends on scheduling efficiency and the target model’s verification capacity.
Separating the two models as logical service components can make orchestration more flexible, but physical separation is not inherently faster.
4.2 Request Pipelining and Continuous Batching
Inference services often process many concurrent requests. Speculative decoding creates opportunities to coordinate drafting and verification with continuous batching.
- Pipeline different request stages. Some requests may be generating drafts while others are ready for verification. A scheduler can coordinate these stages to improve resource utilization.
- Adapt draft length to request requirements. Longer generations may justify larger drafts when acceptance remains high. Latency-sensitive requests may benefit from shorter drafts, particularly when speculative work would delay the first visible output.
- Monitor acceptance online. A domain shift—for example, from general conversation to code generation—can lower acceptance. The system should be able to shorten drafts or fall back to target-only decoding when speculation becomes counterproductive.
Output length alone is not enough to determine the best draft length. Scheduling decisions should also consider acceptance, verification cost, and current load.
4.3 KV Cache and Operator-Level Optimization
Efficient cache handling is essential because speculative decoding creates states that may later be rejected.
- Coordinate KV cache management. Preserve valid historical states and avoid recomputing the target model’s accepted context. Draft and target models generally require their own model-specific KV states, even if a common manager coordinates allocation and lifecycle.
- Discard rejected speculative states correctly. Cache entries associated with an invalid draft suffix must not become part of the committed context.
- Apply standard inference optimizations to verification. Operator fusion and tensor parallelism can still be used where supported. Verification processes multiple sequence positions in one forward pass while retaining causal dependencies.
- Reuse memory buffers. Shared buffer pools can reduce repeated allocation and release when multiple drafting instances or requests are active.
Cache coordination reduces overhead; it does not imply that unrelated models can directly reuse each other’s KV tensors.
5. Key Challenges and Optimization Directions
5.1 Acceptance Is Sensitive to the Input Distribution
A draft model that performs well on general conversation may agree much less often with the target model on code or specialized technical content.
Potential responses include:
- Domain-adaptive distillation.
- Routing requests to specialized draft models.
- Improving stopping rules so the system avoids extending drafts that are unlikely to pay off.
Acceptance should therefore be evaluated across representative workloads, not only as a single aggregate metric.
5.2 Sharing a Draft Model Across Multiple Targets
Organizations may serve several target models with different sizes or behaviors. Training and maintaining a separate draft model for every target can be costly.
Possible directions include:
- Conditioning a shared draft model with target-specific prefixes or continuous prompts.
- Using shared embeddings where architectures are compatible.
- Applying low-rank adapters to switch between target-specific behaviors.
These approaches aim to reduce training and operational overhead, but each target still requires validation of agreement and end-to-end performance.
5.3 Adapting to Inference Hardware
Draft-model overhead can become significant on CPUs, edge devices, or other constrained hardware.
Deployment evaluation should measure the draft model’s actual latency on the intended platform. Depending on the environment, options include INT8 or lower-precision quantization and specialized FPGA acceleration.
The objective is not merely to make the draft model small. Its execution cost must remain low enough for speculation to improve the complete inference pipeline.
6. From Draft Models to Collaborative Inference
Draft models combine two complementary capabilities: the speed of a lightweight model and the generation quality of a larger target model. This idea is expanding into broader forms of collaborative inference.
Promising directions include:
- Hierarchical drafting: Cascades of models at different scales can generate and refine proposals in stages, aiming to improve the efficiency of longer speculative sequences.
- Learned acceptance prediction: Lightweight classifiers may help predict useful draft lengths or likely rejection points, reducing wasted speculative work. Replacing exact verification outright, however, does not automatically preserve the target distribution.
- Task-specific draft models: Models tailored to code generation, SQL translation, or structured extraction may achieve more stable agreement within their intended domains.
For engineering teams, the decision to adopt speculative decoding should come from end-to-end benchmarking. Target-model size, deployment hardware, request concurrency, output length, acceptance behavior, and latency objectives all influence the result.
A draft model is not simply an extra small model attached to a larger one. It is part of a coordinated inference system in which proposal generation, verification, scheduling, and cache management must work together. When those components are well matched, speculative decoding can reduce inference latency while preserving the target model’s intended output behavior.
