Inferensys

Glossary

Draft Model Distillation

Draft model distillation is the process of training a small, fast draft model to closely mimic the output probability distributions of a larger, more accurate target model, specifically to improve the draft's acceptance rate in speculative decoding.
ML engineer managing model training cluster on laptop, GPU utilization visible, technical deep learning setup.
SPECULATIVE DECODING

What is Draft Model Distillation?

Draft model distillation is a specialized training process that creates a small, efficient draft model by mimicking the output behavior of a large target model, specifically to improve the performance of speculative decoding.

Draft model distillation is the process of training a small, fast student model (the draft) to replicate the next-token probability distributions of a large, powerful teacher model (the target). This is a form of knowledge distillation explicitly optimized for the speculative decoding paradigm, where the draft model's primary objective is to generate candidate token sequences that the target model will accept with high probability. The goal is not to create a general-purpose small model, but one whose outputs align so closely with the target's that the acceptance rate during speculative verification is maximized, directly translating to lower inference latency.

The distillation process typically uses a distillation loss, such as Kullback-Leibler divergence, to minimize the difference between the draft and target model's output logits over a training dataset. This creates a small-big model pair with tightly coupled behavior. A well-distilled draft model reduces the verification cost penalty and increases the speedup factor by minimizing the number of rollback events. This technique is distinct from general model compression, as it focuses exclusively on optimizing for the parallel verification forward pass, making it a critical component of hardware-aware speculation strategies for production inference systems.

SPECULATIVE DECODING

Key Characteristics of Draft Model Distillation

Draft model distillation is a specialized training process that creates a small, efficient draft model by mimicking the output behavior of a large target model, specifically to improve the performance of speculative decoding.

01

Objective: Mimic Output Distributions

The core goal is not to replicate the target model's internal weights, but to train the draft model to produce token probability distributions that closely match those of the target model. A high-fidelity match directly increases the acceptance rate during speculative decoding, as the target model is more likely to agree with the draft's proposals. This is typically achieved using knowledge distillation loss functions like Kullback-Leibler (KL) divergence, which minimizes the statistical distance between the two models' output probabilities.

02

Architectural Asymmetry

The draft model is architecturally distinct and significantly smaller than the target model. Common approaches include:

  • Reduced Parameters: Fewer layers and a smaller hidden dimension.
  • Shallow Transformers: A 2-4 layer network versus the target's 10s or 100s of layers.
  • Specialized Designs: Models like Medusa heads are not standalone networks but lightweight prediction heads attached to the target model for self-speculation. This asymmetry ensures the draft model's forward pass is orders of magnitude faster than the target's, which is the prerequisite for net latency reduction.
03

Training Data & Domain Alignment

Effective distillation requires training on data representative of the target model's operational domain.

  • Static Datasets: Often uses a subset of the target model's pre-training corpus (e.g., C4, Wikipedia).
  • Dynamic/Online Data: Can involve generating outputs from the target model on-the-fly for distillation, ensuring alignment with the target's current behavior and any fine-tuning.
  • Context Importance: Training must teach the draft to correctly interpret long contexts, as speculative decoding operates on the full prompt and generation history. Poor context handling leads to low acceptance rates after the first few tokens.
04

Loss Functions & Training Regimes

Standard cross-entropy loss is insufficient. Training employs distillation-specific objectives:

  • KL Divergence Loss: The primary loss, minimizing KL(Target_Probabilities || Draft_Probabilities).
  • Temperature Scaling: A softmax temperature parameter (T) is used to soften the target model's probability distribution, making it easier for the draft to learn.
  • Combined Losses: Often combines KL loss with a small amount of standard cross-entropy on ground-truth tokens to stabilize training.
  • Sequence-Level Training: Models are trained to predict multi-token sequences, not just single next tokens, to better prepare for generating the candidate sequence in speculation.
05

Evaluation Metric: Acceptance Rate

The ultimate success metric is the draft model's acceptance rate when paired with its target model in a speculative decoding loop. This is measured empirically and differs from traditional accuracy or perplexity.

  • A high acceptance rate (e.g., >80% for 3-5 draft tokens) leads to a high speedup factor.
  • Evaluation must be performed on held-out, domain-relevant text to be meaningful.
  • The relationship is non-linear: small improvements in acceptance rate can lead to large improvements in latency reduction, as they reduce the frequency of costly rollback mechanisms.
06

Distinction from General Model Distillation

Draft model distillation is a specialized subset of general knowledge distillation, with key differences:

AspectGeneral DistillationDraft Model Distillation
Primary GoalCreate a generally capable, compact student model.Create an ultra-fast proxy that predicts the specific target's next-token distribution.
EvaluationTask accuracy, perplexity on benchmarks.Acceptance rate and latency speedup in speculative decoding.
Model UseThe student is the final deployed model.The draft is a helper component; the target model produces the final output.
FocusPreserving broad knowledge and reasoning.Optimizing for a single, autoregressive task: next-token prediction.
SPECULATIVE DECODING

How Draft Model Distillation Works

Draft model distillation is a training process that creates a small, efficient draft model by having it learn to replicate the output probability distributions of a large, accurate target model.

The core objective is to maximize the acceptance rate during speculative decoding. A high acceptance rate directly translates to a greater speedup factor by minimizing wasteful verification cost. The student model (draft) is trained on a dataset, and its predicted token distributions are aligned with those of the teacher model (target) using a distillation loss function, typically Kullback-Leibler divergence. This teaches the draft to mimic the target's behavior, not just its final outputs.

This process is distinct from standard model distillation for standalone deployment. Here, the draft is optimized for a specific small-big model pair and the unique mechanics of token verification. Effective distillation must account for the latency-accuracy tradeoff, ensuring the draft is both fast and accurate enough to maintain the target's output quality. The resulting draft model enables efficient parallel decoding, where its proposed candidate sequences are verified in a single verification forward pass by the target.

SPECIFIC TECHNIQUE COMPARISON

Draft vs. General Model Distillation

This table compares Draft Model Distillation—a specialized technique for speculative decoding—against the broader, more general practice of Model Distillation.

Feature / MetricDraft Model DistillationGeneral Model Distillation

Primary Objective

Maximize token acceptance rate for speculative decoding speedup

Preserve the accuracy/capabilities of a teacher model in a smaller student

Training Signal Focus

Next-token probability distributions for short, contiguous sequences

Final output logits, hidden states, or task-specific outputs

Critical Evaluation Metric

Acceptance Rate

Task Accuracy (e.g., GLUE, MMLU), Perplexity

Model Architecture Constraint

Must be extremely fast (low latency) to not offset verification gains

Focus on parameter efficiency; latency is secondary to accuracy

Typical Student Model Size

Tiny (< 100M parameters)

Small to Medium (100M - 3B parameters)

Common Training Data

Synthetic sequences from the target model's output distribution

Original task-specific training dataset (e.g., SQuAD, instruction data)

Integration Point

Tightly coupled with a specific target model's inference pipeline

Decoupled; student is a standalone replacement model

Failure Mode Impact

Low acceptance rate negates speculative decoding speedup, reverting to AR

Reduced student accuracy degrades standalone application performance

DRAFT MODEL DISTILLATION

Frequently Asked Questions

Draft model distillation is a core technique for optimizing speculative decoding, focusing on training a compact, efficient draft model to closely mimic a larger target model's behavior. These questions address its mechanisms, benefits, and practical implementation.

Draft model distillation is the process of training a small, fast student model (the draft) to replicate the output probability distributions of a large, accurate teacher model (the target) for use in speculative decoding. It works by using the teacher model's soft labels—its probability distributions over the vocabulary for given inputs—as training targets for the student model, rather than hard, one-hot token labels. This teaches the draft model not just which token the teacher would pick, but the relative likelihood of all possible tokens, enabling it to generate candidate sequences that the target model is more likely to accept during the parallel verification forward pass. The core objective is to maximize the acceptance rate, thereby improving the speedup factor of the overall speculative decoding system.

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.