Speculative Decoding Meets Quantization: Compatibility Evaluation and Hierarchical Framework Design

Yudi Zhang, Weilin Zhao, Xu Han, Tiejun Zhao, Wang Xu, Hailong Cao, Conghui ZhuarXiv 2025 · DOI

Abstract

Large Language Model (LLM) inference is primarily constrained by memory bandwidth. While quantization and speculative decoding (SD) are standard techniques to mitigate this, recent research identifies a significant "compatibility conflict" between them. Advanced tree-based SD methods, such as EAGLE-2, suffer from high verification overhead when applied to 4-bit quantized models. This paper introduces HierSpec, a hierarchical speculative decoding framework that utilizes an intermediate model to bridge the gap between tree-style drafting and sequential verification. HierSpec achieves a 2.78× speedup on Llama-3-70B with near-lossless accuracy, effectively resolving the bottleneck in quantized LLM acceleration.

Introduction: The Memory-Bound Bottleneck

The primary challenge in deploying Large Language Models (LLMs) is their "memory-bound" nature. Inference speed is often limited not by the GPU's compute capacity, but by the rate at which model weights can be transferred from memory to the processor. Two primary strategies have emerged to address this:

  1. Quantization: Reducing the precision of model weights (e.g., from 16-bit to 4-bit) to decrease the data transfer volume.
  2. Speculative Decoding (SD): Employing a smaller "draft" model to predict multiple future tokens, which are then verified in parallel by the larger "target" model.

While both techniques are effective individually, their combination has proven surprisingly problematic.

The Compatibility Conflict

The authors identify a fundamental mismatch between advanced speculative decoding and low-bit quantization. Modern SD methods like EAGLE-2 use complex "tree-style" drafts to increase the probability of token acceptance. However, the specialized kernels used for 4-bit quantization are highly optimized for sequential processing. When these kernels are tasked with verifying a complex tree of guesses, the computational overhead—the "verification tax"—skyrockets.

Speedup comparison showing the diminishing returns of speculative decoding (EAGLE-2) as quantization becomes more aggressive.

As shown in the figure above, the relative speedup (indicated by red arrows) provided by EAGLE-2 is significantly higher for FP16 models than for 4-bit quantized models (W4A16). In some cases, the overhead of tree verification nearly cancels out the benefits of quantization.

Key Insights and the "Verification Tax"

The core of the conflict lies in the ratio of verification time to decoding time. In standard 16-bit models, verifying a large tree of tokens is computationally inexpensive. In contrast, for 4-bit models, the verification step becomes a new bottleneck.

Impact of draft tree size on verification overhead and overall speedup across different quantization levels.

Analysis of the draft tree size reveals two critical insights:

  • The Verification Tax: For quantized models (e.g., W4A16), the verification ratio increases sharply as the draft tree size grows, whereas it remains relatively flat for FP16.
  • Diminishing Returns: Unlike FP16 models, which generally see better speedups with larger trees, quantized models often reach peak efficiency with smaller trees. Beyond a certain point, the cost of verification outweighs the gain in accepted token length.

HierSpec: A Hierarchical Framework

To resolve this conflict, the researchers developed HierSpec (Hierarchical Speculative Decoding). This framework introduces an intermediate model to act as a bridge between the lightweight drafter and the quantized target model.

The HierSpec workflow consists of three stages:

  1. Lightweight Drafting: A minimal module generates a broad tree of potential token paths.
  2. Intermediate Verification: A mid-sized model (e.g., Llama-3-8B) verifies the tree. Because this model is small and typically runs in higher precision, it can quickly identify the most likely path, collapsing the tree into a high-quality sequence draft.
  3. Quantized Target Verification: The massive, 4-bit quantized target model (e.g., 70B) performs a single, efficient sequential verification of the sequence draft.

By converting the "tree-style" draft into a "sequence-style" draft before it reaches the quantized kernels, HierSpec maintains high acceptance rates while avoiding the verification tax.

Experimental Results

The framework was evaluated on NVIDIA A100 and RTX 3090 GPUs using the Llama-3 family across benchmarks including GSM8K, HumanEval, and MT-Bench.

  • Performance: HierSpec achieved a 2.78× speedup for the W4A16 Llama-3-70B model, outperforming EAGLE-2 by 1.31×.
  • Accuracy: The approach is near-lossless; using GPTQ with rotation (W4A16) preserved the reasoning and coding capabilities of the original FP16 models.
  • Efficiency: By offloading tree-search complexity to the intermediate model, HierSpec significantly reduced total latency compared to vanilla speculative methods.

Conclusion and Future Work

HierSpec demonstrates that the key to accelerating quantized LLMs lies in maintaining "orthogonality" between compression and speculative logic. By using a hierarchical approach, the benefits of both techniques can be realized simultaneously.

Future research directions include integrating KV cache quantization to further reduce memory pressure and adapting the framework for a wider variety of hardware architectures. Additionally, exploring the optimal sizing of intermediate models for different target model scales remains an area for further optimization.

Summary updated

BibTeX
@misc{zhang2025speculative,
  author = {Yudi Zhang and Weilin Zhao and Xu Han and Tiejun Zhao and Wang Xu and Hailong Cao and Conghui Zhu},
  title = {{Speculative Decoding Meets Quantization: Compatibility Evaluation and Hierarchical Framework Design}},
  year = {2025},
  eprint = {2505.22179},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.22179},
}
Figure