Inferensys

Glossary

Draft Model

A draft model is a smaller, faster language model used in speculative decoding to generate a sequence of candidate tokens for verification by a larger target model.
ML engineer working on model compression and quantization, laptop showing performance benchmarks, technical workspace.
SPECULATIVE DECODING

What is a Draft Model?

A draft model is a specialized, smaller language model used to accelerate the text generation of a larger, primary model.

A draft model is a smaller, faster language model used in speculative decoding to generate a short sequence of candidate future tokens for verification by a larger, more accurate target model. Its sole purpose is to propose plausible continuations, allowing the target model to verify multiple tokens in a single, parallel forward pass instead of generating them one-by-one autoregressively. This architectural pattern creates a latency-throughput tradeoff, where the draft's speed offsets the target's verification cost for a net inference speedup.

The draft model's effectiveness is measured by its acceptance rate—the percentage of its proposed tokens the target model accepts. High acceptance is critical; a low rate wastes verification compute. Drafts are often created via model distillation from the target or are small, general-purpose models like T5-Small or GPT-2. Techniques like confidence thresholding can filter its outputs. In advanced variants like self-speculative decoding, auxiliary structures like Medusa heads act as an internal draft, eliminating the need for a separate model entirely.

SPECULATIVE DECODING

Key Characteristics of a Draft Model

A draft model is a smaller, faster language model used in speculative decoding to generate a sequence of candidate tokens for verification by a larger target model. Its primary function is to accelerate inference by proposing likely continuations that the target model can verify in parallel.

01

Core Function: Token Proposal

The draft model's fundamental role is to perform fast, autoregressive token generation to create a candidate sequence (typically 3-10 tokens, defined by the speculative factor, γ). This sequence is a 'best guess' of what the target model would generate next. The draft operates with minimal latency, trading off some accuracy for raw speed, as its outputs are provisional and subject to verification.

02

Architectural Profile: Small & Fast

Draft models are architecturally optimized for minimal latency and memory footprint, not maximum accuracy. Common characteristics include:

  • Reduced Parameters: Often 10x-100x smaller than the target model (e.g., a 125M parameter draft for a 7B parameter target).
  • Shallow Layers: Fewer transformer blocks to decrease sequential computation.
  • Optimized for Single-Token Latency: The primary metric is time-to-first-token and the time to generate the γ-token draft sequence, which must be less than the target's time to generate those same tokens autoregressively.
03

Training & Alignment with Target

To maximize the acceptance rate, the draft model must be distributionally aligned with the target model. Common training methodologies include:

  • Distillation: Training the draft on the logits or output distributions of the target model on a broad corpus.
  • Domain-Specific Tuning: Fine-tuning the draft on data representative of the target's deployment context to improve prediction relevance.
  • Architectural Homogeneity: Using a smaller version of the same model family (e.g., Llama 3 8B as draft for Llama 3 70B) can improve alignment due to shared tokenizers and training data.
04

Performance Metrics: Acceptance Rate & Speedup

A draft model's efficacy is measured by its impact on the overall inference system:

  • Acceptance Rate: The percentage of proposed tokens accepted by the target model. A higher rate directly increases the speedup factor. Rates of 70-85% are common for well-aligned pairs.
  • Speedup Factor: The ratio T_autoregressive / T_speculative. Net speedup occurs when: (Time to Draft γ tokens) + (Time to Verify γ tokens) < (Time for Target to generate γ tokens autoregressively).
  • Verification Cost: The computational overhead of the target model's parallel scoring pass. The draft must be fast enough that this cost doesn't erase the gains.
05

Integration in the Speculative Decoding Loop

The draft model is not used in isolation; it is a component in a tightly coupled inference loop:

  1. Drafting Phase: The draft generates γ candidate tokens autoregressively, conditioned on the current context.
  2. Verification Phase: The target model performs a single, batched forward pass to score all γ tokens in parallel.
  3. Accept/Reject & Rollback: Tokens are accepted where the target's probability matches the draft's prediction. On first rejection, a rollback mechanism reverts to that position, and the target model generates the correct token.
  4. Cache Management: The speculative KV cache from drafting may be reused to optimize the verification pass.
06

Variants & Advanced Drafting Strategies

Beyond a standalone small LM, the 'draft' function can be implemented through other mechanisms:

  • Self-Speculative Decoding: The target model drafts for itself using auxiliary structures like Medusa heads, eliminating a separate model.
  • N-Gram Drafting: Uses a static table of frequent token sequences from training data for ultra-fast, memory-based proposals.
  • Dynamic Draft Selection: A system uses multiple draft models or strategies, selecting the one with highest predicted confidence for the given context.
  • Lookahead Decoding: Leverages the target model's own intermediate representations to draft future tokens.
INFERENCE OPTIMIZATION

How a Draft Model Works in Speculative Decoding

A draft model is the fast, lightweight component in speculative decoding that proposes future tokens for rapid verification.

A draft model is a smaller, faster language model used in speculative decoding to generate a short sequence of candidate tokens for parallel verification by a larger, more accurate target model. Its sole purpose is to propose plausible continuations, or a candidate sequence, at a fraction of the computational cost of the primary model. This enables the system to verify multiple tokens in a single verification forward pass, bypassing the sequential bottleneck of standard autoregressive generation.

The draft model's effectiveness is measured by its acceptance rate, the percentage of its proposed tokens accepted by the target model. A high acceptance rate directly translates to a greater speedup factor. Draft models are typically distilled from the target model or are architecturally similar but heavily compressed. Their design prioritizes minimal latency over absolute accuracy, as errors are corrected by the subsequent verification step, ensuring output distribution remains identical to the target model's autoregressive output.

SPECULATIVE DECODING COMPONENTS

Draft Model vs. Target Model: A Comparison

A technical comparison of the two core models in a speculative decoding system, highlighting their distinct roles, characteristics, and performance trade-offs.

Feature / MetricDraft ModelTarget ModelNotes / Implications

Primary Role

Proposes candidate token sequences

Verifies and corrects candidate sequences

Draft is speculative; Target is authoritative.

Model Size

Small (e.g., 100M - 7B parameters)

Large (e.g., 70B - 1T+ parameters)

Size differential is critical for the speedup.

Inference Speed

Very Fast (e.g., < 5 ms/token)

Slow (e.g., 50-200 ms/token)

Draft must be significantly faster to offset verification cost.

Architectural Complexity

Simpler, often a distilled version

Complex, state-of-the-art foundation model

Draft can use fewer layers, smaller vocabularies.

Memory Footprint (VRAM)

Low (e.g., < 4 GB)

High (e.g., 40-400+ GB)

Dictates hardware requirements and batching capacity.

Output Quality (Perplexity)

Lower (Higher perplexity)

Higher (Lower perplexity)

Target model defines the final output quality standard.

Acceptance Rate Target

High (> 70-80% ideal)

N/A (Performs verification)

Directly determines speculative decoding speedup.

Training Method

Distillation from target model or independent pre-training

Standard large-scale pre-training & fine-tuning

Distillation aligns draft distribution with target.

KV Cache Usage

Generates speculative KV cache for its sequence

Consumes and verifies against speculative KV cache

Enables parallel verification of the candidate sequence.

Failure Mode on Rejection

Proposal is discarded; generation rolls back

Provides the correct single token autoregressively

System falls back to standard target model decoding.

Optimization Goal

Maximize throughput & acceptance rate

Maximize accuracy & reasoning capability

Draft is optimized for latency; Target for capability.

Cost per 1K Tokens

Very Low

Very High

Economic incentive: draft many cheap tokens, verify few expensive ones.

DRAFT MODEL

Implementation and Optimization Considerations

A draft model's effectiveness is determined by its speed, acceptance rate, and integration with the target model. These cards detail the key engineering decisions for optimizing this component of speculative decoding.

01

Architecture Selection & Distillation

The draft model's architecture is chosen for minimal latency, not maximum accuracy. Common choices include:

  • Distilled variants of the target model (e.g., a 1.3B parameter version of a 70B model).
  • Specialized small models like Phi-2 or TinyLlama, which offer strong performance per parameter.
  • N-gram or lookup-based models for extreme speed but lower acceptance rates.

Draft model distillation is a critical optimization, where the small model is explicitly trained to mimic the next-token probability distributions of the larger target model, directly maximizing the acceptance rate.

02

Acceptance Rate Optimization

The acceptance rate is the primary metric for draft model efficacy. A low rate negates the speedup from parallel verification. Optimization strategies include:

  • Temperature tuning: Adjusting the draft model's sampling temperature to better align with the target model's distribution.
  • Confidence thresholding: Only proposing a draft token if the draft model's probability exceeds a set threshold (e.g., 0.8), otherwise letting the target model generate.
  • Context-aware drafting: Using the recent generation history to predict when the draft model is likely to be accurate (e.g., for common phrases) versus inaccurate (e.g., for novel reasoning).
03

Speculative Factor (Gamma) Tuning

The speculative factor (γ) defines how many tokens the draft model generates ahead of the target model. This is a crucial hyperparameter with a direct trade-off:

  • Small γ (e.g., 3-5): Lower risk. If most tokens are rejected, the rollback cost is minimal. Best for low-confidence domains.
  • Large γ (e.g., 8-10): Higher potential speedup if acceptance is high, but a single early rejection wastes the computation on all subsequent drafted tokens.

Optimal γ is found empirically and depends on the draft/target model pair, hardware, and batch size. It must satisfy the core inequality: Cost(verify γ tokens) < γ * Cost(generate 1 token autoregressively).

04

Hardware & Memory Considerations

The draft model must reside in fast memory alongside the target model to avoid I/O bottlenecks. Key considerations:

  • GPU Memory Footprint: The draft model, its KV cache, and the target model's expanded cache for verification must fit simultaneously. This often limits the practical size of the draft model.
  • Kernel Fusion: Draft model inference must use optimized kernels to ensure its forward pass is truly negligible compared to the target model's.
  • Batch Processing: In a batched serving environment, the draft model must generate candidate sequences for all requests in the batch efficiently. Dynamic batching strategies must account for the two-stage draft-verify process.
05

Integration with the Target Model

Efficient integration minimizes overhead. This involves:

  • Shared Tokenizers & Embeddings: Using aligned vocabularies to avoid costly re-tokenization or projection between draft and target token spaces.
  • KV Cache Management: The speculative KV cache generated during drafting must be efficiently integrated into the target model's attention mechanism for the parallel verification pass. This requires careful memory layout planning.
  • Early Stopping & Rollback: The system must implement a low-overhead early stopping mechanism to halt verification upon the first token rejection and a fast rollback to revert to the last accepted token before resuming generation (often from the target model).
06

Dynamic Draft Selection

Advanced systems may employ multiple draft strategies and select between them dynamically to maximize performance.

  • Model Router: A lightweight classifier decides per-token or per-sequence whether to use a fast n-gram draft, a small neural draft, or no draft at all.
  • Confidence-Based Fallback: If the primary draft model's confidence is low, the system can bypass drafting for that step, invoking the target model directly to preserve output quality.
  • Cost-Aware Drafting: The system can adjust the drafting strategy based on current server load and latency SLAs, trading some speedup for consistency under load.
DRAFT MODEL

Frequently Asked Questions

A draft model is a smaller, faster language model used in speculative decoding to generate candidate tokens for verification by a larger target model. This FAQ addresses its role, mechanics, and optimization.

A draft model is a smaller, faster language model used in the speculative decoding inference optimization technique. Its primary function is to generate a sequence of candidate tokens (the candidate sequence) rapidly and with low computational cost. This draft sequence is then passed to the larger, more accurate target model for parallel verification in a single verification forward pass. The target model accepts each draft token if it matches its own predicted token, leading to a net reduction in latency. The effectiveness of the technique hinges on the draft model's ability to predict tokens the target model would have generated, measured by the acceptance rate.

Prasad Kumkar

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.