Hierarchical Speculative Decoding (HSD) is a state-of-the-art lossless verification algorithm for accelerating large language model (LLM) inference. HSD verifies draft outputs using the joint probability of multiple draft tokens and reconstructs the target model’s joint distribution through a hierarchy of resampling distributions across different branches. This hierarchical verification enables HSD to accept more tokens in expectation than both token-wise and block-wise verification methods, while strictly preserving the target model’s output distribution—i.e., without any degradation in model performance.
Moreover, its strong explainability and generality make it readily integrable into a wide range of speculative decoding frameworks. Notably, HSD serves as a drop-in replacement for token-wise verification. For example, by directly replacing the token-wise verification in a pre-fine-tuned EAGLE-3 model, HSD achieves over a 12% performance improvement without requiring any additional fine-tuning.
Experiments are conducted with the widely adopted GPTQ-quantized 8-bit instruction-tuned Qwen2.5 series Bai et al., 2023. By default, we employ the 0.5B model as the draft model and 72B as the target model, with a temperature of 1. All experiments were conducted on a single NVIDIA H20 GPU with 96 GB of memory, unless otherwise specified.
We compare two lossless verification methods—Token-wise Leviathan et al., 2023 and Block-wise Sun et al., 2024—using two metrics: Block Efficiency (tokens/step) and Decoding Speed (tokens/second).
Please install python=3.10 and transformers=4.46.3, then copy the provided files under the transformers directory to:
anaconda3/envs/your_environment_name/lib/python3.10/site-packages/transformers/
Then navigate to chain-of-thought-hub/gsm8k:
cd chain-of-thought-hub/gsm8k
Baseline methods:
bash eval_speculative_qwen.sh
Our methods:
bash eval_speculative_qwen_backward_clever.sh
Extends HSD to use multiple independently sampled drafts for even better performance.
Tokenwise multidraft
bash eval_speculative_qwen_multidraft_11.sh
HSD multidraft
bash eval_speculative_qwen_backward_clever_multidraft_11.sh
Finally, evaluate Block Efficiency and Decoding Speed:
python compute_speculative_stats.py
Using Qwen2.5-0.5B as draft model on GSM8K:
| Target Model | Tokenwise | HSD (ours) |
|---|---|---|
| Qwen2.5-72B | 0.8213 | 0.8517 |
| Qwen2.5-32B | 0.8213 | 0.8479 |
| Qwen2.5-14B | 0.8327 | 0.8327 |
HSD maintains or slightly improves accuracy (both Token-wise and HSD are lossless methods, so any deviations are due to randomness) while offering significantly faster inference.
| Method | BE 14B | BE 32B | BE 72B | DS 14B | DS 32B | DS 72B |
|---|---|---|---|---|---|---|
| Tokenwise | 5.99 | 6.14 | 6.44 | 82.28 | 53.87 | 31.49 |
| Blockwise | 6.13 (+2.3%) | 6.26 (+2.0%) | 6.53 (+1.4%) | 86.06 (+4.6%) | 54.91 (+1.9%) | 31.79 (+1.0%) |
| HSD (Ours) | 6.30 (+5.2%) | 6.47 (+5.4%) | 6.65 (+3.3%) | 91.05 (+10.7%) | 57.12 (+6.0%) | 32.52 (+3.3%) |
HSD consistently improves both Block Efficiency (BE) and Decoding Speed (DS) relative to Tokenwise and Blockwise verification. For GSM8K, the gains are stable across scales, with BE improvements of 5.2%-5.4% at 14B/32B and 3.3% at 72B, accompanied by DS increases of up to 10.7%.
HSD can be integrated with EAGLE-3 to further improve performance. EAGLE-3 fine-tunes an additional component to predict draft tokens from the target model's hidden features, eliminating the need for a separate draft model and thereby improving decoding speed.
To demonstrate HSD’s compatibility with advanced decoding systems, we integrated it into the state-of-the-art EAGLE-3-LLaMa3.1-Instruct-8B (with a default draft length of 7) by replacing its token-wise verifier, as shown in Table 3. Importantly, HSD operates orthogonally to the drafting phase, so it can be used directly with a pre-fine-tuned EAGLE-3 model without requiring any additional fine-tuning.
| Method | Block Eff. | Decoding Speed |
|---|---|---|
| EAGLE-3 | 3.22 | 116.50 |
| Blockwise | N/A | N/A |
| EAGLE-3H (Ours) | 3.61 (+12.1%) | 135.42 (+16.2%) |
For EAGLE integration setup, see the EAGLE-hsd/ directory in this repo.
cd EAGLE-3H
bash eagle_eval.sh
@misc{zhou2026overcomingjointintractabilitylossless,
title={Overcoming Joint Intractability with Lossless Hierarchical Speculative Decoding},
author={Yuxuan Zhou and Fei Huang and Heng Li and Fengyi Wu and Tianyu Wang and Jianwei Zhang and Junyang Lin and Zhi-Qi Cheng},
year={2026},
eprint={2601.05724},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2601.05724},
}
Python
82.7%
Jupyter Notebook
17.1%
Hierarchical Speculative Decoding (HSD) is a state-of-the-art lossless verification algorithm for accelerating large language model (LLM) inference. HSD verifies draft outputs using the joint probability of multiple draft tokens and reconstructs the target model’s joint distribution through a hierarchy of resampling distributions across different branches. This hierarchical verification enables HSD to accept more tokens in expectation than both token-wise and block-wise verification methods, while strictly preserving the target model’s output distribution—i.e., without any degradation in model performance.
Moreover, its strong explainability and generality make it readily integrable into a wide range of speculative decoding frameworks. Notably, HSD serves as a drop-in replacement for token-wise verification. For example, by directly replacing the token-wise verification in a pre-fine-tuned EAGLE-3 model, HSD achieves over a 12% performance improvement without requiring any additional fine-tuning.
Experiments are conducted with the widely adopted GPTQ-quantized 8-bit instruction-tuned Qwen2.5 series Bai et al., 2023. By default, we employ the 0.5B model as the draft model and 72B as the target model, with a temperature of 1. All experiments were conducted on a single NVIDIA H20 GPU with 96 GB of memory, unless otherwise specified.
We compare two lossless verification methods—Token-wise Leviathan et al., 2023 and Block-wise Sun et al., 2024—using two metrics: Block Efficiency (tokens/step) and Decoding Speed (tokens/second).
Please install python=3.10 and transformers=4.46.3, then copy the provided files under the transformers directory to:
anaconda3/envs/your_environment_name/lib/python3.10/site-packages/transformers/
Then navigate to chain-of-thought-hub/gsm8k:
cd chain-of-thought-hub/gsm8k
Baseline methods:
bash eval_speculative_qwen.sh
Our methods:
bash eval_speculative_qwen_backward_clever.sh
Extends HSD to use multiple independently sampled drafts for even better performance.
Tokenwise multidraft
bash eval_speculative_qwen_multidraft_11.sh
HSD multidraft
bash eval_speculative_qwen_backward_clever_multidraft_11.sh
Finally, evaluate Block Efficiency and Decoding Speed:
python compute_speculative_stats.py
Using Qwen2.5-0.5B as draft model on GSM8K:
| Target Model | Tokenwise | HSD (ours) |
|---|---|---|
| Qwen2.5-72B | 0.8213 | 0.8517 |
| Qwen2.5-32B | 0.8213 | 0.8479 |
| Qwen2.5-14B | 0.8327 | 0.8327 |
HSD maintains or slightly improves accuracy (both Token-wise and HSD are lossless methods, so any deviations are due to randomness) while offering significantly faster inference.
| Method | BE 14B | BE 32B | BE 72B | DS 14B | DS 32B | DS 72B |
|---|---|---|---|---|---|---|
| Tokenwise | 5.99 | 6.14 | 6.44 | 82.28 | 53.87 | 31.49 |
| Blockwise | 6.13 (+2.3%) | 6.26 (+2.0%) | 6.53 (+1.4%) | 86.06 (+4.6%) | 54.91 (+1.9%) | 31.79 (+1.0%) |
| HSD (Ours) | 6.30 (+5.2%) | 6.47 (+5.4%) | 6.65 (+3.3%) | 91.05 (+10.7%) | 57.12 (+6.0%) | 32.52 (+3.3%) |
HSD consistently improves both Block Efficiency (BE) and Decoding Speed (DS) relative to Tokenwise and Blockwise verification. For GSM8K, the gains are stable across scales, with BE improvements of 5.2%-5.4% at 14B/32B and 3.3% at 72B, accompanied by DS increases of up to 10.7%.
HSD can be integrated with EAGLE-3 to further improve performance. EAGLE-3 fine-tunes an additional component to predict draft tokens from the target model's hidden features, eliminating the need for a separate draft model and thereby improving decoding speed.
To demonstrate HSD’s compatibility with advanced decoding systems, we integrated it into the state-of-the-art EAGLE-3-LLaMa3.1-Instruct-8B (with a default draft length of 7) by replacing its token-wise verifier, as shown in Table 3. Importantly, HSD operates orthogonally to the drafting phase, so it can be used directly with a pre-fine-tuned EAGLE-3 model without requiring any additional fine-tuning.
| Method | Block Eff. | Decoding Speed |
|---|---|---|
| EAGLE-3 | 3.22 | 116.50 |
| Blockwise | N/A | N/A |
| EAGLE-3H (Ours) | 3.61 (+12.1%) | 135.42 (+16.2%) |
For EAGLE integration setup, see the EAGLE-hsd/ directory in this repo.
cd EAGLE-3H
bash eagle_eval.sh
@misc{zhou2026overcomingjointintractabilitylossless,
title={Overcoming Joint Intractability with Lossless Hierarchical Speculative Decoding},
author={Yuxuan Zhou and Fei Huang and Heng Li and Fengyi Wu and Tianyu Wang and Jianwei Zhang and Junyang Lin and Zhi-Qi Cheng},
year={2026},
eprint={2601.05724},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2601.05724},
}
Python
82.7%
Jupyter Notebook
17.1%