Speculative decoding is a lossless inference acceleration technique where a lightweight draft model autoregressively generates a sequence of K candidate tokens, and a larger target model evaluates all K tokens in a single parallel forward pass. By accepting tokens that match the target model's distribution and rejecting divergent ones, speculative decoding produces identical output to standard autoregressive decoding while dramatically reducing wall-clock latency.
Glossary
Speculative Decoding

What is Speculative Decoding?
An inference optimization technique that accelerates autoregressive text generation by using a fast draft model to propose multiple candidate tokens, which a larger target model then verifies in parallel, reducing latency without altering the output distribution.
The efficiency gain stems from hardware utilization: the target model's parallel verification of multiple tokens amortizes memory bandwidth costs that would otherwise be incurred per-token. This technique is particularly effective when the draft model achieves high acceptance rates, often using the same tokenizer and a distilled version of the target model. It integrates seamlessly with KV-cache management and is a cornerstone of production LLM serving systems.
Key Characteristics
The defining architectural and operational features that make speculative decoding a critical inference optimization technique.
Draft-Verify Parallelism
The core mechanism involves a two-model pipeline. A small, fast draft model autoregressively generates K candidate tokens. The large target model then verifies all K tokens in a single parallel forward pass, accepting a prefix of correct predictions. This converts a sequential bottleneck into a parallelizable verification step.
Exact Output Distribution
Unlike heuristic sampling modifications, speculative decoding is lossless. The verification step uses a modified rejection sampling algorithm that mathematically guarantees the final output distribution is identical to what the large target model would have produced on its own. There is no degradation in text quality.
Draft Model Alignment
Efficiency depends entirely on the acceptance rate—the fraction of draft tokens the target model agrees with. High alignment requires the draft and target models to share a similar vocabulary and tokenization scheme. Common strategies include using a smaller version of the same model family or a distilled variant.
Tree Attention Verification
Advanced implementations extend beyond simple sequential drafts. The draft model can generate a tree of candidate sequences, and the target model verifies all branches simultaneously using a specialized attention mask. This increases the expected number of accepted tokens per verification step.
Memory-Bound Optimization
Speculative decoding primarily targets the memory-bandwidth bottleneck in autoregressive decoding. By processing multiple tokens in parallel, it amortizes the cost of loading the target model's weights from GPU memory over several generated tokens, moving the workload from memory-bound to compute-bound.
Medusa Heads Extension
A variant approach that eliminates the separate draft model entirely. Multiple Medusa heads—additional feed-forward layers attached to the target model's final hidden state—simultaneously predict several future tokens. This reduces system complexity while maintaining parallel verification.
Frequently Asked Questions
Clear, technically precise answers to the most common questions about speculative decoding, the draft-target verification paradigm, and its role in accelerating large language model inference without altering output distributions.
Speculative decoding is an inference acceleration technique that reduces the latency of autoregressive text generation from large language models without changing their output distribution. The core mechanism operates as a draft-then-verify pipeline: a small, fast draft model (often 10-50x smaller than the target) generates a sequence of K candidate tokens autoregressively. The large target model then processes this entire candidate sequence in a single parallel forward pass, computing the probability distribution for each position. A modified rejection sampling algorithm accepts draft tokens that align with the target distribution and rejects those that diverge, resampling from the corrected distribution. Because the target model verifies multiple tokens per forward pass rather than generating one token at a time, the wall-clock time per token drops significantly—often yielding a 2x-3x speedup—while mathematically guaranteeing that the final output distribution is identical to what the target model would have produced on its own.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Key architectural components and complementary techniques that enable or interact with speculative decoding in production inference pipelines.
Draft Model
A small, lightweight language model that generates candidate token sequences autoregressively at high speed. The draft model typically has 10-100x fewer parameters than the target model and runs on the same or adjacent hardware. Key characteristics:
- Optimized for low latency per token rather than output quality
- Often a distilled version of the target model or a shallower Transformer
- Generates K tokens (typically 3-10) before verification
- Quality gap between draft and target determines acceptance rate
The draft model's predictions must share the same tokenizer vocabulary as the target model to enable direct token-level verification.
Target Model Verification
The large, high-quality model that verifies draft tokens in a single parallel forward pass. Instead of processing one token at a time, the target model:
- Feeds all K draft tokens through the model simultaneously
- Computes output probabilities for each position
- Accepts draft tokens where the draft and target distributions agree
- Rejects at the first mismatch and generates a corrected token
The verification step guarantees that the output distribution is identical to standard autoregressive decoding from the target model alone. This is the key property that distinguishes speculative decoding from approximation methods.
Acceptance Rate
The fraction of draft tokens that survive target model verification. This metric directly determines the speedup multiplier achieved by speculative decoding.
Factors affecting acceptance rate:
- Model alignment: How closely the draft model's distribution matches the target
- Temperature: Lower sampling temperatures increase acceptance rates
- Domain specificity: Draft models fine-tuned on the target domain perform better
- Draft length K: Longer drafts risk lower cumulative acceptance
Typical acceptance rates range from 60-85% in production deployments. A rate below 50% may negate the overhead benefit of running the draft model.
Medusa Heads
An alternative to the separate draft model approach where multiple prediction heads are attached directly to the target model's final hidden layer. Each head predicts a token at a future position:
- Head 1 predicts the next token (t+1)
- Head 2 predicts the token after that (t+2)
- And so on for N heads
Advantages over separate draft models:
- No separate model to load or maintain in memory
- Heads are lightweight (single linear layers)
- Can be trained with a simple distillation loss
- Tree attention enables branching verification of multiple candidate sequences
Medusa achieves comparable speedups to traditional speculative decoding while simplifying the serving architecture.
KV-Cache Interaction
Speculative decoding introduces unique key-value cache management challenges. The KV-cache stores pre-computed attention tensors to avoid redundant computation.
Key considerations:
- The draft model maintains its own KV-cache during autoregressive generation
- The target model's KV-cache must be updated to reflect only accepted tokens
- Rejected tokens require cache rollback to the last accepted position
- Tree attention in Medusa-style approaches requires branching KV-cache structures
Efficient KV-cache management is critical to realizing the latency benefits of speculative decoding. Poor cache handling can consume the speedup gains through memory operations.
Continuous Batching
A serving optimization that combines speculative decoding with dynamic request scheduling. Instead of processing one sequence at a time, continuous batching:
- Groups multiple concurrent requests into a single forward pass
- Dynamically adds new requests and removes completed ones mid-batch
- Applies speculative decoding independently per sequence
- Maximizes GPU utilization by filling compute capacity
The combination of speculative decoding and continuous batching is the foundation of production systems like vLLM and TensorRT-LLM, enabling throughput improvements of 10-20x over naive serving while maintaining low per-token latency.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us