Attention Is All You Need
Ashish Vaswani, Noam Shazeer et al.
0
Citations
0
Influential Citations
—
Venue
2023
Year
… In this work we introduce speculative decoding - an algorithm to sample from autoregressive models faster without any changes to the outputs, by computing several tokens in parallel. …
Speculative decoding addresses a critical bottleneck in deploying large language models (LLMs): inference latency. Autoregressive generation, where tokens are produced one at a time, becomes increasingly slow as models grow, limiting real-time applications like chatbots, code completion, and interactive assistants. By enabling parallel token generation without sacrificing output quality, this work provides a practical solution that can be integrated into existing systems with minimal changes.
The significance lies in its theoretical guarantee: the algorithm produces exactly the same outputs as standard autoregressive sampling. This is a key differentiator from other acceleration methods that trade off quality for speed. For practitioners, this means they can deploy faster inference without retraining models or altering their behavior, making it highly attractive for production environments.
The paper demonstrates speedups of 2x to 3x on large transformer models (e.g., T5-XXL, GPT-like architectures) across various tasks including machine translation and text summarization. The gains are consistent across different sequence lengths and batch sizes, with larger models benefiting more due to the higher cost of sequential token generation. Importantly, the output quality remains identical to standard decoding, as verified by perplexity and human evaluation.
Speculative decoding has broad implications for the AI field. It enables faster inference for LLMs without compromising output quality, which is crucial for real-time applications and reducing operational costs. The method is model-agnostic and can be combined with other optimization techniques like quantization and pruning. This work opens avenues for further research into efficient draft model design and adaptive speculation strategies, potentially making large-scale deployment of LLMs more accessible and sustainable.
Ashish Vaswani, Noam Shazeer et al.
Jakubův, Jan, Chvalovský, Karel et al.
Pauli Virtanen, Ralf Gommers et al.
Tom B. Brown, Benjamin Mann et al.