Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

ParallelSpec: Parallel Drafter for Efficient Speculative Decoding

About

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.

Zilin Xiao, Hongming Zhang, Tao Ge, Siru Ouyang, Vicente Ordonez, Dong Yu• 2024

Related benchmarks

TaskDatasetResultRank
Instruction FollowingAlpaca
Average Accepted Length3.28
51
Multi-turn dialogueMT-Bench
Speedup2.36
44
Mathematical ReasoningMATH 500
Speedup1.89
32
Machine TranslationWMT 23
Speedup1.66
32
Question AnsweringNQ
Speedup1.78
32
Code GenerationHumanEval
Speedup2.5
20
Showing 6 of 6 rows

Other info

Follow for update