Multi-Branch Self-Drafting for LLM Inference Acceleration

Zipeng Gao, Qingrong Xia, Tong Xu, Xinyu Duan, Zhi Zheng, Zhefeng Wang, Enhong Chen

Abstract

Standard autoregressive decoding in Large Language Models (LLMs) is memory-bound and slow, typically generating only one token per forward pass. While speculative decoding offers a solution by using a smaller draft model, it introduces architectural complexity and significant training overhead. This paper presents Self-Draft, a training-free acceleration strategy where the LLM acts as its own drafting engine. By leveraging multi-branch drafting initialized with random tokens and a dynamic context cache, Self-Draft achieves up to 2x throughput gains across diverse benchmarks including dialogue, math, and coding, without requiring any additional fine-tuning.

Introduction

The primary bottleneck in LLM inference is the autoregressive nature of decoding, which requires loading billions of parameters from memory for every single token generated. Speculative decoding mitigates this by using a fast "draft model" to predict future tokens, which the main LLM then verifies in parallel. However, managing two models and ensuring their alignment often requires significant engineering and expensive fine-tuning. Self-Draft addresses these challenges by enabling "self-speculative" decoding that works "out of the box" with existing pre-trained weights.

Methods: The Self-Draft Architecture

Self-Draft transforms the LLM into a self-contained drafting and verification system through three primary components:

  1. Multi-Branch Drafting: The model processes several parallel "draft branches" in a single forward pass. These branches are initialized by appending random "padding" tokens to the prompt.
  2. Custom Attention Masking: A specialized mask ensures that tokens within a draft branch can attend to the main prompt and their own history without cross-branch interference, allowing the LLM to verify and draft simultaneously.
  3. Dual-Cache System:
    • Corpus Cache: A static repository of frequent n-grams derived from general datasets (e.g., OANC).
  4. Context Cache: A dynamic, Least Recently Used (LRU) cache that stores successful sequences generated during the current session, allowing the model to adapt to specific task logic on the fly.
Comparison between standard autoregressive decoding and the Self-Draft architecture featuring the dual-cache system.

Key Insights: Leveraging Noise Robustness

A pivotal discovery in this work is the inherent robustness of LLMs to noise. The researchers found that even when a prompt is appended with random padding tokens, the model can still generate contextually relevant and high-quality sequences.

The impact of random pad tokens on generation quality (BLEU and ROUGE scores), demonstrating the model's robustness to noise.

As shown in the figure above, while accuracy naturally declines as the number of random tokens increases, the scores remain sufficiently high (BLEU/ROUGE > 0.2) to provide viable drafts for speculative verification. Furthermore, the authors observed that for specialized domains like programming, the dynamic context cache is significantly more effective than a static corpus cache, as it captures the immediate stylistic and logical patterns of the conversation.

Experimental Results

The system was evaluated on Llama and CodeLlama (7B/13B) across benchmarks such as MT-Bench, GSM-100, MBPP-100, and HumanEval.

  • Throughput Gains: Self-Draft consistently achieved approximately 2x the throughput compared to standard autoregressive decoding.
  • Decoding Efficiency: The method generated between 2.0 and 3.2 tokens per forward step, a significant improvement over the standard baseline of 1.0.
  • Task Performance: In coding tasks (MBPP), Self-Draft outperformed existing baselines like SpeDe and LADE by over 150%.
  • Computational Overhead: The parallel execution of draft branches on the GPU introduced negligible latency, increasing step time by only ~4% (from 0.023s to 0.024s).

Limitations and Future Directions

While effective, Self-Draft currently relies on exact string matching for cache retrieval, which may miss semantically similar but syntactically different drafts. Additionally, the optimal configuration of branches is currently determined via grid search; future work could explore dynamic adjustment of these parameters based on hardware and task complexity. Finally, the increased memory footprint of the KV-cache for multiple branches remains a consideration for deployment on memory-constrained hardware.

Summary updated

BibTeX
@inproceedings{gao2025multi,
  author = {Zipeng Gao and Qingrong Xia and Tong Xu and Xinyu Duan and Zhi Zheng and Zhefeng Wang and Enhong Chen},
  title = {{Multi-Branch Self-Drafting for LLM Inference Acceleration}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i22.34567},
}
Figure