# The Synergy of Speculative Decoding and Batching in Serving Large Language Models

Source: [The Synergy of Speculative Decoding and Batching in Serving Large Language Models](<https://www.sota2.com/research/paper/68fa71051e209131cea4e99d>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2025-10-26T01:55:42.510Z

Authors: Qidong Su, Christina Giannoula, Gennady Pekhimenko

Published: 2023-10-28T20:36:36.000Z

## Abstract

Large Language Models (LLMs) like GPT are state-of-the-art text generation models that provide significant assistance in daily routines. However, LLM execution is inherently sequential, since they only produce one token at a time, thus incurring low hardware utilization on modern GPUs. Batching and speculative decoding are two techniques to improve GPU hardware utilization in LLM inference. To study their synergy, we implement a prototype implementation and perform an extensive characterization analysis on various LLM models and GPU architectures. We observe that the optimal speculation length depends on the batch size used. We analyze the key observation and build a quantitative model to explain it. Based on our analysis, we propose a new adaptive speculative decoding strategy that chooses the optimal speculation length for different batch sizes. Our evaluations show that our proposed method can achieve equal or better performance than the state-of-the-art speculation decoding schemes with fixed speculation length.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [Output Equivalence on GLM4](<https://www.sota2.com/research/sota/output-equivalence-on-glm4.md>): Output Equivalence; GLM4; Exact Match: 1.

- [Output Equivalence on Vicuna](<https://www.sota2.com/research/sota/output-equivalence-on-vicuna.md>): Output Equivalence; Vicuna; Exact Match: 1.9.

- [Output Equivalence on Qwen3](<https://www.sota2.com/research/sota/output-equivalence-on-qwen3.md>): Output Equivalence; Qwen3; Exact Match: 0.035.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2310.18813>)

[PDF](<https://arxiv.org/pdf/2310.18813.pdf>)
