Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

REST: Retrieval-Based Speculative Decoding

About

We introduce Retrieval-Based Speculative Decoding (REST), a novel algorithm designed to speed up language model generation. The key insight driving the development of REST is the observation that the process of text generation often includes certain common phases and patterns. Unlike previous methods that rely on a draft language model for speculative decoding, REST harnesses the power of retrieval to generate draft tokens. This method draws from the reservoir of existing knowledge, retrieving and employing relevant tokens based on the current context. Its plug-and-play nature allows for seamless integration and acceleration of any language models, all without necessitating additional training. When benchmarked on 7B and 13B language models in a single-batch setting, REST achieves a significant speedup of 1.62X to 2.36X on code or text generation. The code of REST is available at https://github.com/FasterDecoding/REST.

Zhenyu He, Zexuan Zhong, Tianle Cai, Jason D. Lee, Di He• 2023

Related benchmarks

TaskDatasetResultRank
Code GenerationHumanEval (test)--
444
Inference EfficiencyHumanEval
Speedup Factor2.14
54
Code GenerationCodeAlpaca
Average Speed-up3.79
41
Inference AccelerationSpec-Bench
MAT Score1.84
39
SummarizationCNN/DM
Speedup1.14
32
LLM Inference AccelerationMBPP
Speedup2.36
24
LLM Inference AccelerationGSM8K
Speedup2.07
24
Large Language Model InferenceCode Assistant
TPS72
20
Planning-style reasoningACP prog-gen
Speedup1.94
20
Long-context retrievalNIAH multivalue
Speedup2.77
20
Showing 10 of 18 rows

Other info

Follow for update