Accelerating LLM Inference with Staged Speculative Decoding

Benjamin Spector, Chris Re
8/8/2023
cs.AIcs.CL

No confident code implementation found for this paper. 5 possible matches can be shown below.

Abstract

Recent advances with large language models (LLM) illustrate their diverse capabilities. We propose a novel algorithm, staged speculative decoding, to accelerate LLM inference in small-batch, on-device scenarios. We address the low arithmetic intensity of small-batch inference by improving upon previous work in speculative decoding. First, we restructure the speculative batch as a tree, which reduces generation costs and increases the expected tokens per batch. Second, we add a second stage of speculative decoding. Taken together, we reduce single-batch decoding latency by 3.16x with a 762M parameter GPT-2-L model while perfectly preserving output quality.

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. 5 weaker matches are hidden by default — 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{spector2023accelerating,
  title  = {Accelerating LLM Inference with Staged Speculative Decoding},
  author = {Benjamin Spector and Chris Re},
  year   = {2023},
  eprint = {2308.04623},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2308.04623v1}
}

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

Discussion