Fast Inference via Hierarchical Speculative Decoding

Clara Mohri, Haim Kaplan, Tal Schuster, Yishay Mansour, Amir Globerson
10/22/2025
cs.LG

No confident code implementation found for this paper.

Abstract

Transformer language models generate text autoregressively, making inference latency proportional to the number of tokens generated. Speculative decoding reduces this latency without sacrificing output quality, by leveraging a small draft model to propose tokens that the larger target model verifies in parallel. In practice, however, there may exist a set of potential draft models- ranging from faster but less inaccurate, to slower yet more reliable. We introduce Hierarchical Speculative Decoding (HSD), an algorithm that stacks these draft models into a hierarchy, where each model proposes tokens, and the next larger model verifies them in a single forward pass, until finally the target model verifies tokens. We derive an expression for the expected latency of any such hierarchy and show that selecting the latency-optimal hierarchy can be done in polynomial time. Empirically, HSD gives up to 1.2x speed-up over the best single-draft baseline, demonstrating the practicality of our algorithm in reducing generation latency beyond previous techniques.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{mohri2025fast,
  title  = {Fast Inference via Hierarchical Speculative Decoding},
  author = {Clara Mohri and Haim Kaplan and Tal Schuster and Yishay Mansour and Amir Globerson},
  year   = {2025},
  eprint = {2510.19705},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.19705v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.19705.svg)](https://codeofpaper.com/paper/2510.19705)

Discussion