arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2311.08252cs.CLcs.AIcs.IRcs.LG
收藏

REST:基于检索的推测解码

REST: Retrieval-Based Speculative Decoding

Princeton University(普林斯顿大学);Peking University(北京大学)

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

AI总结:

本文提出基于检索的推测解码方法 REST,通过检索相关 token 替代草稿模型加速语言模型生成,无需额外训练,在 7B 和 13B 模型上实现 1.62 至 2.36 倍加速。

摘要:

我们提出了基于检索的推测解码(REST),这是一种旨在加速语言模型生成的新算法。推动 REST 发展的关键洞察是观察到文本生成过程通常包含某些常见阶段和模式。与以往依赖草稿语言模型进行推测解码的方法不同,REST 利用检索的力量来生成草稿 token。该方法从现有知识库中汲取信息,根据当前上下文检索并采用相关 token。其即插即用的特性允许无缝集成并加速任何语言模型,而无需额外训练。在单批次设置下对 7B 和 13B 语言模型进行基准测试时,REST 在代码或文本生成上实现了 1.62 倍至 2.36 倍的显著加速。REST 的代码可在 https://github.com/FasterDecoding/REST 获取。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑