arrow
Return

DySpec: Faster speculative decoding with dynamic token tree structure

delete2025-05-08
delete0
PRE
AI
Y
Yunfan Xiong
R
Ruoyu Zhang
Y
Yanzeng Li
L
Lei Zou *
DOI:10.1007/s11280-025-01344-0delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
While speculative decoding has recently appeared as a promising direction for accelerating the inference of large language models (LLMs), the speedup and scalability are strongly bounded by the token acceptance rate. Prevalent methods usually organize predicted tokens as independent chains or fixed token trees, which fail to generalize to diverse query distributions. In this paper, we propose DySpec, a faster speculative decoding algorithm with a novel dynamic token tree structure. We begin by bridging the draft distribution and acceptance rate from intuitive and empirical clues and successfully show that the two variables are strongly correlated. Based on this, we employ a greedy strategy to dynamically expand the token tree at run-time. Theoretically, we show that our method can achieve optimal results under mild assumptions. Empirically, DySpec yields a higher acceptance rate and acceleration than fixed trees. DySpec can drastically improve throughput and reduce latency of token generation across various data distribution and model sizes, which outperforms strong competitors significantly, including Specinfer and Sequoia. Under low temperature setting, DySpec can improve throughput up to 9.1 x\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times $$\end{document} and reduce latency up to 9.4 x\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times $$\end{document} on Llama2-70B. Under high temperature setting, DySpec can also improve throughput up to 6.21 x\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times $$\end{document}, despite the increasing difficulty of speculating more than one token per step for the draft model.
Keywords:
Artificial intelligence
Large language models
Inference acceleration
Speculative decoding

Journal

W
World Wide Web-Internet and Web Information Systems
IF:
3.4
Papers:
57
Citations:
2.3K

Organization

P
peking university
Scholars:
11.9W
Papers: 8.7W
Citations: 146
Cited Papers

Cited Papers

DeepSpeed
err2020-08-20
err0
PREAI
errJeff Rasley; Samyam Rajbhandari; Olatunji Ruwase; Yuxiong He
errShare
errSave
SpecInfer: Accelerating Large Language Model Serving with Tree-based Speculative Inference and Verification
err2024-04-27
err0
errOAAI
errXupeng Miao; Gabriele Oliaro; Zhihao Zhang; Xinhao Cheng; Zeyu Wang; Zhengxin Zhang; Rae Ying Yee Wong; Alan Zhu; Lijie Yang; Xiaoxiang Shi; Chunan Shi; Zhuoming Chen; Daiyaan Arfeen; Reyna Abhyankar; Zhihao Jia
errShare
errSave
K-BERT: Enabling Language Representation with Knowledge Graph
err2020-04-03
err0
errOAAI
errWeijie Liu; Peng Zhou; Zhe Zhao; Zhiruo Wang; Qi Ju; Haotang Deng; Ping Wang
errShare
errSave
no more