A candidate sequence is the ordered list of tokens generated by a smaller, faster draft model for parallel verification by a larger, more accurate target model in speculative decoding. This sequence, typically of a fixed length called the speculative factor (gamma), is the fundamental unit of speculation. Its quality, measured by the acceptance rate, directly determines the speedup factor achieved by avoiding the target model's slower autoregressive generation for those tokens.
Glossary
Candidate Sequence

What is a Candidate Sequence?
In speculative decoding, a candidate sequence is the core speculative output that enables parallel verification.
The target model performs a single verification forward pass on the entire candidate sequence, scoring each token against its own probability distribution. Accepted tokens are appended to the output, while a rejection triggers a rollback mechanism and autoregressive correction. Optimizing the candidate sequence—through draft model distillation, confidence thresholding, or dynamic draft selection—is critical for maximizing throughput while minimizing the latency-accuracy tradeoff inherent to this inference acceleration technique.
Key Characteristics of a Candidate Sequence
In speculative decoding, a candidate sequence is the ordered list of tokens proposed by a draft model. Its properties directly determine the efficiency and success of the verification step performed by the target model.
Fixed-Length Proposal
A candidate sequence is generated with a predetermined length, known as the speculative factor (γ). This is a key hyperparameter, typically ranging from 3 to 10 tokens. The draft model generates exactly γ tokens in a single, fast autoregressive pass. This fixed length allows the target model's verification forward pass to be perfectly batched, enabling parallel scoring of all γ candidates against the model's own predictions.
Conditional Probability Chain
The sequence is generated autoregressively by the draft model, meaning each token is predicted based on the original context and all previously generated candidate tokens. Formally, for a context x, the candidate sequence (y1, y2, ..., yγ) is sampled from the draft model's distribution: P_draft(y1 | x) * P_draft(y2 | x, y1) * ... * P_draft(yγ | x, y1, ..., yγ-1). This chain rule of probability is fundamental to its structure.
Verification via Parallel Scoring
The core purpose of the candidate sequence is to be verified in parallel by the target model. Instead of running γ separate forward passes, the target model performs one batched forward pass. It takes the context x and the entire candidate sequence as input, using a tree attention or similar mechanism to efficiently compute the target model's probability for each candidate token in its correct position: P_target(yi | x, y1, ..., yi-1) for all i from 1 to γ.
All-or-None Prefix Acceptance
Verification is not token-by-token independent. The target model accepts a prefix of the candidate sequence. It compares its own probability P_target(yi | ...) to the draft's probability P_draft(yi | ...) for each position i, starting from the first token. Acceptance continues sequentially until the first token where P_target(yi) is less than or equal to P_draft(yi). All tokens before this point are accepted; the first mismatched token and all following are rejected. This leads to the rollback mechanism.
Computational Leverage
The sequence creates computational leverage. The cost of generating γ tokens with the small draft model plus the cost of one parallel verification pass with the large target model must be less than the cost of generating γ tokens autoregressively with the large target model alone. This is the fundamental equation for speedup: Cost(draft γ tokens) + Cost(verify γ tokens) < γ * Cost(target 1 token). The candidate sequence is the vehicle for this batched computation.
Quality-Speed Tradeoff Artifact
The sequence embodies the latency-accuracy tradeoff of speculative decoding. A longer sequence (higher γ) offers greater potential speedup but risks a lower acceptance rate, as the draft model's predictions diverge further from the target's over longer horizons. The sequence's content is a direct product of the draft model's capability; a poorly aligned draft model generates low-quality candidates that are frequently rejected, negating the speedup benefit. Techniques like draft model distillation aim to improve candidate sequence quality.
Candidate Sequence vs. Standard Autoregressive Generation
A comparison of the speculative decoding workflow, which uses a candidate sequence, against the traditional token-by-token generation method.
| Feature / Metric | Standard Autoregressive Generation | Candidate Sequence (Speculative Decoding) |
|---|---|---|
Core Mechanism | Generates one token per sequential forward pass. | Drafts a multi-token candidate sequence, then verifies all tokens in one parallel forward pass. |
Model Invocation Pattern | Strictly sequential; N tokens require N serial calls to the target model. | Two-phase: 1) Draft model runs autoregressively, 2) Target model verifies batch in parallel. |
Theoretical Speedup | 1x (baseline). | Up to 2-3x, dependent on acceptance rate and hardware parallelism. |
Primary Bottleneck | Memory bandwidth (KV cache reads) and sequential latency. | Draft model latency and verification cost of the batched forward pass. |
Output Fidelity | Exactly follows the target model's autoregressive distribution. | Identical to target model when all tokens accepted; may diverge slightly on rejection due to rollback. |
GPU Utilization | Often low due to serial execution, especially for small batch sizes. | Higher, due to parallel verification of the candidate sequence, improving compute saturation. |
Memory Access Pattern | Predictable, sequential reads/writes to the KV cache. | Irregular; requires speculative KV cache management and potential rollback state discards. |
Optimal Use Case | Low-latency, single-stream generation where correctness is paramount. | High-throughput batch inference or latency-sensitive applications with a suitable draft model. |
Frequently Asked Questions
A candidate sequence is the core data structure in speculative decoding. These questions address its role, generation, and impact on inference performance.
A candidate sequence is the ordered list of future tokens proposed by a smaller, faster draft model for parallel verification by a larger, more accurate target model.
It is the central mechanism that enables speculative decoding's speedup. Instead of the target model generating one token at a time autoregressively, the draft model rapidly generates a short sequence of k tokens (e.g., 3-5). This sequence is then presented to the target model in a single, batched verification forward pass. The target model scores each proposed token against its own probability distribution, accepting correct tokens and rejecting the first incorrect one. The acceptance rate of these candidate tokens directly determines the overall speedup factor of the inference process.
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
The candidate sequence is a core component of speculative decoding. The following terms define the models, mechanisms, and metrics involved in its creation and verification.
Draft Model
A draft model is the smaller, faster language model responsible for generating the candidate sequence. Its sole purpose is to propose a short series of likely future tokens (the speculative factor, γ) to accelerate the larger target model. Key characteristics include:
- Speed: Must be significantly faster than the target model to offset verification overhead.
- Alignment: Often distilled from the target model to maximize token acceptance rate.
- Architecture: Can be a smaller transformer, an n-gram model, or auxiliary heads (like Medusa) attached to the target model itself.
Target Model
The target model is the primary, larger, and more accurate language model that verifies the candidate sequence. It performs a single, batched forward pass to score all draft tokens against its own predictions. Its role is twofold:
- Verifier: Accepts draft tokens that match its predicted distribution.
- Corrector: Rejects incorrect draft tokens and generates the correct token autoregressively from that point. The computational verification cost of this parallel pass must be less than the cost of generating the same number of tokens autoregressively for a net speedup.
Token Verification
Token verification is the deterministic process where the target model validates the candidate sequence. In a single verification forward pass, the target model computes probability distributions for all positions in the sequence. The standard algorithm is:
- For each position i, if the target model's probability for the draft token is greater than a random threshold, the token is accepted.
- The first token where this condition fails is rejected.
- All subsequent tokens in the candidate sequence are discarded, triggering a rollback mechanism where generation continues autoregressively from the target model's corrected output.
Acceptance Rate
The acceptance rate is the critical metric determining the efficacy of speculative decoding. It measures the percentage of tokens proposed by the draft model that are accepted by the target model. Its impact is direct:
- A high acceptance rate (e.g., >80%) means most draft tokens are correct, leading to a high speedup factor.
- A low acceptance rate increases rollbacks, diminishing returns as verification cost is wasted on incorrect candidates. The rate depends on draft model quality, task difficulty, and the chosen speculative factor (γ).
Speculative Factor (γ)
The speculative factor, often denoted as gamma (γ), is the fixed length of the candidate sequence generated by the draft model. It represents a fundamental trade-off:
- Small γ (e.g., 3-5): Lower risk, higher likelihood of acceptance, but limited potential speedup per verification pass.
- Large γ (e.g., 5-10): Higher potential speedup, but acceptance rate typically drops, increasing wasted verification compute. Optimal γ is determined empirically, balancing the draft model's speed, the target model's verification cost, and the latency-accuracy tradeoff.
Rollback Mechanism
The rollback mechanism is the failure-handling protocol in speculative decoding. When the target model rejects a token in the candidate sequence, the system must recover correctly. The process is:
- Generation reverts to the last accepted token position.
- The target model's own predicted token (sampled from its distribution at the rejection point) is emitted.
- Standard autoregressive decoding continues from this new point, or a new speculative cycle begins. This mechanism guarantees that the final output is mathematically identical to what the target model would have produced alone, preserving output distribution.

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