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

ParallelSpec: Parallel Drafter for Efficient Speculative Decoding

Zilin Xiao, Hongming Zhang, Tao Ge, Siru Ouyang, Vicente Ordonez, Dong Yu

TL;DR

Speculative decoding accelerates Large Language Model (LLM) inference by using a small "drafter" model to guess upcoming tokens, which a larger "target" model then verifies in parallel. However, traditional drafters still generate tokens one-by-one, creating a sequential bottleneck. ParallelSpec eliminates this bottleneck by introducing a single, lightweight parallel drafter that predicts multiple future tokens simultaneously in a single forward pass, boosting inference speeds by up to 62% over existing speculative decoding baselines.

What Problem Does This Paper Address?

Large Language Models (LLMs) are notoriously slow because they generate text auto-regressively—meaning they must perform a full model forward pass to predict every single token. Speculative Decoding (SD) mitigates this by using a tiny, low-cost drafter model to quickly generate a sequence of candidate tokens. The massive target model then checks all these candidates at once in a single parallel step.

While this makes the verification stage parallel, the drafting stage itself remains strictly sequential. As a result, the time spent drafting grows linearly with the number of tokens guessed, making the drafting phase a significant latency bottleneck.

Figure 1: Illustration of PARALLELSPEC. Left: comparison between auto-regressive drafting and our proposed parallel drafting. Blocks in green indicate normal draft tokens. Blocks in yellow denote the mask tokens used to prompt the draft model to generate multiple future tokens in a single forward pass. Right: wall time trace diagrams for two drafting styles integrated with EAGLE (Li et al., 2024b) in two rounds of speculative sampling.

As shown in the wall-time trace above, sequential drafting takes up a massive chunk of the total generation time. Previous works tried to fix this by dynamically changing the draft length, but they didn't solve the underlying issue: the drafter is still stuck generating text one token at a time.

Methods

The authors propose ParallelSpec, a plug-and-play drafting module that replaces sequential drafters with a parallel-decoding architecture. Rather than using multiple independent language model heads (like Medusa-style frameworks), which struggle to scale when vocabularies exceed 128,000 tokens, ParallelSpec relies on a single lightweight model that leverages parameter sharing.

  • Inference via [MASK] Tokens: To predict multiple tokens at once, ParallelSpec appends $k$ special [MASK] tokens to the end of the input sequence. In a single forward pass, the model uses the contextualized representations of these mask tokens to sample $k$ future tokens simultaneously.
  • Group-wise Parallel Training: Training a model to predict multiple tokens in parallel can introduce a mismatch between how the model sees data during training versus inference. The authors designed a custom causal attention mask and position index layout where tokens are organized into "parallel groups." Training pairs are forced to ignore [MASK] tokens from previous groups, ensuring the model behaves identically during both training and evaluation.
Parallel drafter inference, training, and token/position ID layouts.

ParallelSpec is highly versatile and was successfully integrated into two leading speculative decoding frameworks: Medusa (which uses offline knowledge distillation) and EAGLE (which uses online feature-level regression).

Datasets

The authors evaluated ParallelSpec using SpecBench, a standardized benchmark suite covering six distinct text generation domains:

  • MT-Bench: Multi-turn conversations
  • CNN/Daily Mail: Text summarization
  • Natural Questions: Question answering and retrieval-augmented generation
  • WMT14 DE-EN: Machine translation
  • GSM8K: Mathematical reasoning

For alignment training, the authors utilized 68,000 conversations from the ShareGPT dataset, exploring both standard supervised fine-tuning (SFT) and a self-distillation setup where target models generated the training text.

Key Insights and Ideas

  • Parameter Sharing Wins: Using a single model with shared parameters for multi-token prediction is far more parameter- and memory-efficient than maintaining separate decoding heads for every lookahead position, especially as modern LLMs adopt massive vocabularies.
  • End-to-End Parallelization: True token-level parallelization can be achieved in both stages of speculative decoding, completely removing the linear latency scaling of the drafting phase.
  • The Lookahead Sweet Spot: Predicting too far into the future causes drafting accuracy to plummet. The authors discovered a clear saturation point: a parallel group size of $K=4$ mask tokens yields the optimal trade-off between drafting speed and verification acceptance rate.

Key Results

  • Massive Medusa Acceleration: Integrating ParallelSpec into Vicuna-7B Medusa boosted the average speedup ratio from 1.42× to 2.31×—a 62.7% relative performance improvement.
  • State-of-the-Art Boosts: When integrated into the already highly optimized EAGLE framework, ParallelSpec delivered extra speedups across the board, achieving an overall 2.55× to 2.84× speedup on Llama-2-13B models.
  • Latency Halved: Real-world wall-time simulations demonstrated that ParallelSpec successfully cut the time cost of the drafting phase nearly in half compared to baseline methods.

Limitations and Future Work

  • Minor Acceptance Trade-off: Because ParallelSpec discards strict sequential token dependencies during the drafting phase, it suffers from a slight drop in drafting accuracy, leading to a minor decrease in the average number of tokens accepted per verification round ($\tau$).
  • Domain Sensitivity: The relative speedup on highly optimized models like LLaMA3-8B-Instruct was slightly lower than on LLaMA2. The authors attribute this to a distributional misalignment between the ShareGPT training data and the target model's internal distribution. Future work will focus on developing tighter data alignment strategies to maximize parallel drafting accuracy.

Summary updated

BibTeX
@misc{xiao2024parallelspec,
  author = {Zilin Xiao and Hongming Zhang and Tao Ge and Siru Ouyang and Vicente Ordonez and Dong Yu},
  title = {{ParallelSpec: Parallel Drafter for Efficient Speculative Decoding}},
  year = {2024},
  eprint = {2410.05589},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.05589},
}
Figure