SuffixDecoding: Extreme Speculative Decoding for Emerging AI Applications

Gabriele Oliaro, Zhihao Jia, Daniel Campos, Aurick Qiao
11/7/2024
45 citations
cs.CLcs.AIcs.DC

Official code: snowflakedb/ArcticInference (494 stars, Python, Apache-2.0, last commit 2026-04-23).

Abstract

Speculative decoding is widely adopted to reduce latency in large language model (LLM) inference by leveraging smaller draft models capable of handling diverse user tasks. However, emerging AI applications, such as LLM-based agents, present unique workload characteristics: instead of diverse independent requests, agentic frameworks typically submit repetitive inference requests, such as multi-agent pipelines performing similar subtasks or self-refinement loops iteratively enhancing outputs.

Show full abstract

These workloads result in long and highly predictable sequences, which current speculative decoding methods do not effectively exploit. To address this gap, we introduce \emph{SuffixDecoding}, a novel method that utilizes efficient suffix trees to cache long token sequences from prompts and previous outputs. By adaptively speculating more tokens when acceptance likelihood is high and fewer when it is low, SuffixDecoding effectively exploits opportunities for longer speculations while conserving computation when those opportunities are limited. Evaluations on agentic benchmarks, including SWE-Bench and Text-to-SQL, demonstrate that SuffixDecoding achieves speedups of up to 5.3$\times$, outperforming state-of-the-art methods -- 2.8$\times$ faster than model-based approaches like EAGLE-2/3 and 1.9$\times$ faster than model-free approaches such as Token Recycling. SuffixDecoding is open-sourced at https://github.com/snowflakedb/ArcticInference

View on arXivView PDF

Code Implementations(1)

Apache-2.0

ArcticInference: vLLM plugin for high-throughput, low-latency inference

49469Python, CudaMar 21, 20257 months agoApache-2.0

Similar Papers

Cite this paper

@article{oliaro2024suffixdecoding,
  title  = {SuffixDecoding: Extreme Speculative Decoding for Emerging AI Applications},
  author = {Gabriele Oliaro and Zhihao Jia and Daniel Campos and Aurick Qiao},
  year   = {2024},
  eprint = {2411.04975},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2411.04975v3},
  journal = {NEURIPS 2024 2024}
}

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/2411.04975.svg)](https://codeofpaper.com/paper/2411.04975)

Discussion