Multi-Candidate Speculative Decoding

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Yang, Sen, Huang, Shujian, Dai, Xinyu, Chen, Jiajun
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913193812557824
author Yang, Sen
Huang, Shujian
Dai, Xinyu
Chen, Jiajun
author_facet Yang, Sen
Huang, Shujian
Dai, Xinyu
Chen, Jiajun
contents Large language models have shown impressive capabilities across a variety of NLP tasks, yet their generating text autoregressively is time-consuming. One way to speed them up is speculative decoding, which generates candidate segments (a sequence of tokens) from a fast draft model that is then verified in parallel by the target model. However, the acceptance rate of candidate tokens receives limitations from several factors, such as the model, the dataset, and the decoding setup. This paper proposes sampling multiple candidates from a draft model and then organising them in batches for verification. We design algorithms for efficient multi-candidate verification while maintaining the distribution of the target model. Our approach shows significant improvements in acceptance rates on multiple datasets and models, consistently outperforming standard speculative decoding.
format Preprint
id arxiv_https___arxiv_org_abs_2401_06706
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Multi-Candidate Speculative Decoding
Yang, Sen
Huang, Shujian
Dai, Xinyu
Chen, Jiajun
Computation and Language
Large language models have shown impressive capabilities across a variety of NLP tasks, yet their generating text autoregressively is time-consuming. One way to speed them up is speculative decoding, which generates candidate segments (a sequence of tokens) from a fast draft model that is then verified in parallel by the target model. However, the acceptance rate of candidate tokens receives limitations from several factors, such as the model, the dataset, and the decoding setup. This paper proposes sampling multiple candidates from a draft model and then organising them in batches for verification. We design algorithms for efficient multi-candidate verification while maintaining the distribution of the target model. Our approach shows significant improvements in acceptance rates on multiple datasets and models, consistently outperforming standard speculative decoding.
title Multi-Candidate Speculative Decoding
topic Computation and Language
url https://arxiv.org/abs/2401.06706