ParallelSpec: Parallel Drafter for Efficient Speculative Decoding

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Xiao, Zilin, Zhang, Hongming, Ge, Tao, Ouyang, Siru, Ordonez, Vicente, Yu, Dong
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866912062979964928
author Xiao, Zilin
Zhang, Hongming
Ge, Tao
Ouyang, Siru
Ordonez, Vicente
Yu, Dong
author_facet Xiao, Zilin
Zhang, Hongming
Ge, Tao
Ouyang, Siru
Ordonez, Vicente
Yu, Dong
contents Speculative decoding has proven to be an efficient solution to large language model (LLM) inference, where the small drafter predicts future tokens at a low cost, and the target model is leveraged to verify them in parallel. However, most existing works still draft tokens auto-regressively to maintain sequential dependency in language modeling, which we consider a huge computational burden in speculative decoding. We present ParallelSpec, an alternative to auto-regressive drafting strategies in state-of-the-art speculative decoding approaches. In contrast to auto-regressive drafting in the speculative stage, we train a parallel drafter to serve as an efficient speculative model. ParallelSpec learns to efficiently predict multiple future tokens in parallel using a single model, and it can be integrated into any speculative decoding framework that requires aligning the output distributions of the drafter and the target model with minimal training cost. Experimental results show that ParallelSpec accelerates baseline methods in latency up to 62% on text generation benchmarks from different domains, and it achieves 2.84X overall speedup on the Llama-2-13B model using third-party evaluation criteria.
format Preprint
id arxiv_https___arxiv_org_abs_2410_05589
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle ParallelSpec: Parallel Drafter for Efficient Speculative Decoding
Xiao, Zilin
Zhang, Hongming
Ge, Tao
Ouyang, Siru
Ordonez, Vicente
Yu, Dong
Computation and Language
Machine Learning
Speculative decoding has proven to be an efficient solution to large language model (LLM) inference, where the small drafter predicts future tokens at a low cost, and the target model is leveraged to verify them in parallel. However, most existing works still draft tokens auto-regressively to maintain sequential dependency in language modeling, which we consider a huge computational burden in speculative decoding. We present ParallelSpec, an alternative to auto-regressive drafting strategies in state-of-the-art speculative decoding approaches. In contrast to auto-regressive drafting in the speculative stage, we train a parallel drafter to serve as an efficient speculative model. ParallelSpec learns to efficiently predict multiple future tokens in parallel using a single model, and it can be integrated into any speculative decoding framework that requires aligning the output distributions of the drafter and the target model with minimal training cost. Experimental results show that ParallelSpec accelerates baseline methods in latency up to 62% on text generation benchmarks from different domains, and it achieves 2.84X overall speedup on the Llama-2-13B model using third-party evaluation criteria.
title ParallelSpec: Parallel Drafter for Efficient Speculative Decoding
topic Computation and Language
Machine Learning
url https://arxiv.org/abs/2410.05589