A Drop-In Solution for On-the-Fly Adaptation of Speculative Decoding in Large Language Models

Jiesong Liu, Brian Park, Xipeng Shen


Abstract
Large Language Models (LLMs) are cutting-edge generative AI models built on transformer architecture, which tend to be highly memory-intensive when performing real-time inference. Various strategies have been developed to enhance the end-to-end inference speed for LLMs, one of which is speculative decoding. This technique involves running a smaller LLM (draft model) for inference over a defined window size, denoted as 𝛾, while simultaneously being validated by the larger LLM (target model). Choosing the optimal 𝛾 value and the draft model is essential for unlocking the potential of speculative decoding. But it is difficult to do due to the complicated influence from various factors, including the nature of the task, the hardware in use, and the combination of the large and small models. This paper introduces *on-the-fly adaption of speculative decoding*, a solution that dynamically adapts the choices to maximize the efficiency of speculative decoding for LLM inferences. As a drop-in solution, it needs no offline benchmarking or training. Experiments show that the solution can lead to 3.55-16.48% speed improvement over the standard speculative decoding, and 1.2-3.4× over the default LLMs.
Anthology ID:
2025.acl-long.482
Volume:
Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)
Month:
July
Year:
2025
Address:
Vienna, Austria
Editors:
Wanxiang Che, Joyce Nabende, Ekaterina Shutova, Mohammad Taher Pilehvar
Venue:
ACL
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
9778–9794
Language:
URL:
https://preview.aclanthology.org/ingestion-acl-25/2025.acl-long.482/
DOI:
Bibkey:
Cite (ACL):
Jiesong Liu, Brian Park, and Xipeng Shen. 2025. A Drop-In Solution for On-the-Fly Adaptation of Speculative Decoding in Large Language Models. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 9778–9794, Vienna, Austria. Association for Computational Linguistics.
Cite (Informal):
A Drop-In Solution for On-the-Fly Adaptation of Speculative Decoding in Large Language Models (Liu et al., ACL 2025)
Copy Citation:
PDF:
https://preview.aclanthology.org/ingestion-acl-25/2025.acl-long.482.pdf