Multi-Draft Speculative Sampling: Canonical Decomposition and Theoretical Limits
Fuente:
arXiv
Saved in:
| Main Authors: | , , , , , |
|---|---|
| Format: | Preprint |
| Published: |
2024
|
| Subjects: | |
| Online Access: | |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| _version_ | 1866913827748052992 |
|---|---|
| author | Khisti, Ashish Ebrahimi, M. Reza Dbouk, Hassan Behboodi, Arash Memisevic, Roland Louizos, Christos |
| author_facet | Khisti, Ashish Ebrahimi, M. Reza Dbouk, Hassan Behboodi, Arash Memisevic, Roland Louizos, Christos |
| contents | We consider multi-draft speculative sampling, where the proposal sequences are sampled independently from different draft models. At each step, a token-level draft selection scheme takes a list of valid tokens as input and produces an output token whose distribution matches that of the target model. Previous works have demonstrated that the optimal scheme (which maximizes the probability of accepting one of the input tokens) can be cast as a solution to a linear program. In this work we show that the optimal scheme can be decomposed into a two-step solution: in the first step an importance sampling (IS) type scheme is used to select one intermediate token; in the second step (single-draft) speculative sampling is applied to generate the output token. For the case of two identical draft models we further 1) establish a necessary and sufficient condition on the distributions of the target and draft models for the acceptance probability to equal one and 2) provide an explicit expression for the optimal acceptance probability. Our theoretical analysis also motives a new class of token-level selection schemes based on weighted importance sampling. Our experimental results demonstrate consistent improvements in the achievable block efficiency and token rates over baseline schemes in a number of scenarios. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2410_18234 |
| institution | arXiv |
| publishDate | 2024 |
| record_format | arxiv |
| spellingShingle | Multi-Draft Speculative Sampling: Canonical Decomposition and Theoretical Limits Khisti, Ashish Ebrahimi, M. Reza Dbouk, Hassan Behboodi, Arash Memisevic, Roland Louizos, Christos Computation and Language Distributed, Parallel, and Cluster Computing Information Theory Machine Learning We consider multi-draft speculative sampling, where the proposal sequences are sampled independently from different draft models. At each step, a token-level draft selection scheme takes a list of valid tokens as input and produces an output token whose distribution matches that of the target model. Previous works have demonstrated that the optimal scheme (which maximizes the probability of accepting one of the input tokens) can be cast as a solution to a linear program. In this work we show that the optimal scheme can be decomposed into a two-step solution: in the first step an importance sampling (IS) type scheme is used to select one intermediate token; in the second step (single-draft) speculative sampling is applied to generate the output token. For the case of two identical draft models we further 1) establish a necessary and sufficient condition on the distributions of the target and draft models for the acceptance probability to equal one and 2) provide an explicit expression for the optimal acceptance probability. Our theoretical analysis also motives a new class of token-level selection schemes based on weighted importance sampling. Our experimental results demonstrate consistent improvements in the achievable block efficiency and token rates over baseline schemes in a number of scenarios. |
| title | Multi-Draft Speculative Sampling: Canonical Decomposition and Theoretical Limits |
| topic | Computation and Language Distributed, Parallel, and Cluster Computing Information Theory Machine Learning |
| url | https://arxiv.org/abs/2410.18234 |