NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Draft& Verify: Lossless Large Language Model Acceleration via Self-Speculative Decoding

Jun Zhang, Jue Wang, Huan Li, Lidan Shou, Ke Chen, Gang Chen, Sharad Mehrotra

Abstract

Autoregressive decoding in Large Language Models (LLMs) is often bottlenecked by memory-bound operations, leading to high latency. While speculative decoding offers a solution by using a smaller draft model, it introduces challenges in model alignment and increased memory overhead. We present Draft & Verify, a self-speculative decoding framework that eliminates the need for a separate draft model. By strategically skipping intermediate layers of the target LLM to generate draft tokens and subsequently verifying them with the full model, we achieve up to a 2× speedup. This approach is entirely lossless, requires no additional training, and maintains a minimal memory footprint.

Introduction

The primary bottleneck in deploying LLMs like LLaMA or GPT-4 is the autoregressive nature of decoding, where text is generated one token at a time. Each step requires a full forward pass through billions of parameters, making the process "memory-bound"—the GPU spends more time moving data than performing computations.

Existing "speculative decoding" techniques attempt to mitigate this by using a smaller, faster "draft model" to predict a sequence of tokens, which the larger "target model" then verifies in a single batch. However, this approach faces two significant hurdles:

  1. Alignment Complexity: It is difficult to find or train a small model that consistently mimics the output distribution of a specific, often fine-tuned, large model.
  2. Resource Overhead: Maintaining two separate models in GPU memory is often impractical for resource-constrained devices.

Methodology: The Draft & Verify Framework

The proposed Draft & Verify approach uses the LLM as its own draft model, a concept termed "self-speculative decoding."

Layer Skipping and Verification

Instead of a separate model, a "draft" version is created by bypassing specific intermediate layers (MLP and Attention blocks) of the original LLM. This significantly accelerates the draft generation phase. The original, unaltered LLM then verifies these draft tokens in a single forward pass. Since verification uses the original weights, the final output is mathematically identical to standard decoding, ensuring the process is completely lossless.

The Draft & Verify process: skipping layers for fast drafting followed by full-model verification.

Optimization Strategies

  • Bayesian Optimization (BO): To determine which layers to skip, the authors employ BO to search for an optimal configuration that balances speed and draft accuracy. This offline search is performed once per model.
  • Adaptive Draft-Exiting: To avoid wasting computation on low-confidence drafts, a dynamic threshold (γ) adjusts based on the real-time acceptance rate. If the draft's confidence falls below this threshold, the system immediately transitions to the verification stage.

Experimental Evaluation

The method was evaluated on a variety of models, including LLaMA-2 (13B, 70B), LLaMA-2-Chat, and CodeLLaMA (13B, 34B). Tasks spanned text summarization (CNN/DM, XSum), code generation (HumanEval), mathematics (GSM8K), and general dialogue (MT-bench).

Key Insights and Results

Model Redundancy and the "Sweet Spot"

A core finding is that LLMs exhibit significant architectural redundancy. Skipping intermediate layers—particularly Attention layers, which are more computationally expensive during decoding—does not immediately degrade next-token prediction quality.

Speedup vs. number of skipped sub-layers for a 13B model, showing the optimal performance peak.

For a 13B parameter model, peak speedup is achieved when approximately half of the layers are skipped. As shown in the figure above, skipping beyond a certain point (e.g., more than 42 out of 80 sub-layers) leads to a sharp decline in draft quality, increasing rejections and slowing overall performance.

Performance Gains

  • Acceleration: The framework achieved end-to-end speedups of up to 1.99× on LLaMA-2-70B and 1.57× on LLaMA-2-13B.
  • Lossless Quality: Performance across all benchmarks remained identical to standard decoding, confirming that acceleration does not sacrifice model intelligence.
  • Efficiency: The adaptive exit mechanism proved superior to static thresholds, allowing the model to "know when to quit" on difficult sequences, saving unnecessary computation.

Limitations and Future Directions

While highly effective, the Bayesian Optimization process requires a few hours of offline computation per model. Additionally, for extremely low-resource settings, "aggressive skipping" (>70% layers) might require light fine-tuning to maintain draft quality. Future work will explore adapting self-speculative decoding for high-throughput batched inference environments.

Summary updated

BibTeX
@inproceedings{zhang2024draft,
  author = {Jun Zhang and Jue Wang and Huan Li and Lidan Shou and Ke Chen and Gang Chen and Sharad Mehrotra},
  title = {{Draft\& Verify: Lossless Large Language Model Acceleration via Self-Speculative Decoding}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.acl-long.607},
}
Figure