Dynamic Speculation Lookahead Accelerates Speculative Decoding of Large Language Models

Jonathan Mamou*, Oren Pereg, Daniel Korat, Moshe Berchansky, Nadav Timor, Moshe Wasserblat, Roy Schwartz

*Corresponding author for this work

Research output: Contribution to journalConference articlepeer-review

Abstract

Speculative decoding is commonly used for reducing the inference latency of large language models. Its effectiveness depends highly on the speculation lookahead (SL) - the number of tokens generated by the draft model at each iteration. In this work we show that the common practice of using the same SL for all iterations (static SL) is suboptimal. We introduce DISCO (DynamIc SpeCulation lookahead Optimization), a novel method for dynamically selecting the SL. Our experiments with four datasets show that DISCO reaches an average speedup of 10% compared to the best static SL baseline, while generating the exact same text.

Original languageEnglish
Pages (from-to)456-467
Number of pages12
JournalProceedings of Machine Learning Research
Volume262
StatePublished - 2024
Event4th NeurIPS Efficient Natural Language and Speech Processing Workshop - Vancouver, Canada
Duration: 14 Dec 2024 → …

Bibliographical note

Publisher Copyright:
© 2024 Proceedings of Machine Learning Research.

Fingerprint

Dive into the research topics of 'Dynamic Speculation Lookahead Accelerates Speculative Decoding of Large Language Models'. Together they form a unique fingerprint.

Cite this