A Theoretical Perspective for Speculative Decoding Algorithm

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Yin, Ming, Chen, Minshuo, Huang, Kaixuan, Wang, Mengdi
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866917826809298944
author Yin, Ming
Chen, Minshuo
Huang, Kaixuan
Wang, Mengdi
author_facet Yin, Ming
Chen, Minshuo
Huang, Kaixuan
Wang, Mengdi
contents Transformer-based autoregressive sampling has been the major bottleneck for slowing down large language model inferences. One effective way to accelerate inference is \emph{Speculative Decoding}, which employs a small model to sample a sequence of draft tokens and a large model to validate. Given its empirical effectiveness, the theoretical understanding of Speculative Decoding is falling behind. This paper tackles this gap by conceptualizing the decoding problem via markov chain abstraction and studying the key properties, \emph{output quality and inference acceleration}, from a theoretical perspective. Our analysis covers the theoretical limits of speculative decoding, batch algorithms, and output quality-inference acceleration tradeoffs. Our results reveal the fundamental connections between different components of LLMs via total variation distances and show how they jointly affect the efficiency of decoding algorithms.
format Preprint
id arxiv_https___arxiv_org_abs_2411_00841
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle A Theoretical Perspective for Speculative Decoding Algorithm
Yin, Ming
Chen, Minshuo
Huang, Kaixuan
Wang, Mengdi
Machine Learning
Artificial Intelligence
Computation and Language
Transformer-based autoregressive sampling has been the major bottleneck for slowing down large language model inferences. One effective way to accelerate inference is \emph{Speculative Decoding}, which employs a small model to sample a sequence of draft tokens and a large model to validate. Given its empirical effectiveness, the theoretical understanding of Speculative Decoding is falling behind. This paper tackles this gap by conceptualizing the decoding problem via markov chain abstraction and studying the key properties, \emph{output quality and inference acceleration}, from a theoretical perspective. Our analysis covers the theoretical limits of speculative decoding, batch algorithms, and output quality-inference acceleration tradeoffs. Our results reveal the fundamental connections between different components of LLMs via total variation distances and show how they jointly affect the efficiency of decoding algorithms.
title A Theoretical Perspective for Speculative Decoding Algorithm
topic Machine Learning
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2411.00841