Lune

NeurIPS2023顶会

SpecTr: Fast Speculative Decoding via Optimal Transport

Ziteng Sun, Ananda Theertha Suresh, Jae Hun Ro, Ahmad Beirami, Himanshu Jain, Felix X. Yu

摘要

Autoregressive sampling from large language models has led to state-of-the-art results in several natural language tasks. However, autoregressive sampling generates tokens one at a time making it slow, and even prohibitive in certain tasks. One way to speed up sampling is speculative decoding\textit{speculative decoding}: use a small model to sample a draft\textit{draft} (block or sequence of tokens), and then score all tokens in the draft by the large language model in parallel. A subset of the tokens in the draft are accepted (and the rest rejected) based on a statistical method to guarantee that the final output follows the distribution of the large model. In this work, we provide a principled understanding of speculative decoding through the lens of optimal transport (OT) with membership cost\textit{membership cost}. This framework can be viewed as an extension of the well-known maximal-coupling\textit{maximal-coupling} problem. This new formulation enables us to generalize the speculative decoding method to allow for a set of kk candidates at the token-level, which leads to an improved optimal membership cost. We show that the optimal draft selection algorithm (transport plan) can be computed via linear programming, whose best-known runtime is exponential in kk. We then propose a valid draft selection algorithm whose acceptance probability is (1−1/e)(1-1/e)-optimal multiplicatively. Moreover, it can be computed in time almost linear with size of domain of a single token. Using this newdraftselectionnew draft selection algorithm, we develop a new autoregressive sampling algorithm called SpecTr\textit{SpecTr}, which provides speedup in decoding while ensuring that there is no quality degradation in the decoded output. We experimentally demonstrate that for state-of-the-art large language models, the proposed approach achieves a wall clock speedup of 2.13X, a further 1.37X speedup over speculative decoding on standard benchmarks.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 59 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • DistillSpec: Improving Speculative Decoding via Knowledge Distillation 引用了 Fast Inference from Transformers via Speculative Decoding
  • Fast Best-of-N Decoding via Speculative Rejection 引用了 Language Models are Few-Shot Learners
  • Fast Best-of-N Decoding via Speculative Rejection 引用了 Fast Inference from Transformers via Speculative Decoding
  • EAGLE-3: Scaling up Inference Acceleration of Large Language Models via Training-Time Test 引用了 Fast Inference from Transformers via Speculative Decoding
  • Language Model Cascades: Token-Level Uncertainty And Beyond 引用了 Language Models are Few-Shot Learners
  • Language Model Cascades: Token-Level Uncertainty And Beyond 引用了 Fast Inference from Transformers via Speculative Decoding
  • Language Model Cascades: Token-Level Uncertainty And Beyond 引用了 The Curious Case of Neural Text Degeneration
  • Skeleton-of-Thought: Prompting LLMs for Efficient Parallel Generation 引用了 Language Models are Few-Shot Learners
  • Skeleton-of-Thought: Prompting LLMs for Efficient Parallel Generation 引用了 Fast Inference from Transformers via Speculative Decoding
  • Language Models are Few-Shot Learners 引用了 The Curious Case of Neural Text Degeneration
  • Fast Inference from Transformers via Speculative Decoding 引用了 Language Models are Few-Shot Learners
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper59

  1. EAGLE-3: Scaling up Inference Acceleration of Large Language Models via Training-Time TestYuhui Li, Fangyun Wei, Chao Zhang, Hongyang ZhangNeurIPS 2025 · 347 次引用
  2. Fast Best-of-N Decoding via Speculative RejectionHanshi Sun, Momin Haider, Ruiqi Zhang, Huitao Yang 等NeurIPS 2024 · 144 次引用
  3. DistillSpec: Improving Speculative Decoding via Knowledge DistillationYongchao Zhou, Kaifeng Lyu, Ankit Singh Rawat, Aditya Krishna Menon 等ICLR 2024 · 143 次引用
  4. Language Model Cascades: Token-Level Uncertainty And BeyondNeha Gupta, Harikrishna Narasimhan, Wittawat Jitkrittum, Ankit Singh Rawat 等ICLR 2024 · 119 次引用
  5. Skeleton-of-Thought: Prompting LLMs for Efficient Parallel GenerationXuefei Ning, Zinan Lin, Zixuan Zhou, Zifu Wang 等ICLR 2024 · 105 次引用

它引用的 Paper3

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes 等ICLR 2020 · 4,112 次引用
  3. Fast Inference from Transformers via Speculative DecodingYaniv Leviathan, Matan Kalman, Yossi MatiasICML 2023 · 1,472 次引用

相关 Paper

  1. Global Resolution: Optimal Multi-Draft Speculative Sampling via Convex OptimizationRahul Krishna Thomas, Arka PalICLR 2026 · 2 次引用
  2. SpecHub: Provable Acceleration to Multi-Draft Speculative DecodingRyan Sun, Tianyi Zhou, Xun Chen, Lichao SunEMNLP 2024
  3. Towards Optimal Multi-draft Speculative DecodingZhengmian Hu, Tong Zheng, Vignesh Viswanathan, Ziyi Chen 等ICLR 2025
  4. A Theoretical Perspective for Speculative Decoding AlgorithmMing Yin, Minshuo Chen, Kaixuan Huang, Mengdi WangNeurIPS 2024 · 36 次引用
  5. LK Losses: Direct Acceptance Rate Optimization for Speculative DecodingAlexander Samarin, Sergei Krutikov, Anton Shevtsov, Sergei Skvortsov 等ICML 2026 · 11 次引用
黄昏的海面,两侧是细线勾勒的悬崖