arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2304.04487cs.CLcs.AI
收藏

参考推理:大语言模型的无损加速

Inference with Reference: Lossless Acceleration of Large Language Models

Microsoft(微软)

Nan Yang, Tao Ge, Liang Wang, Binxing Jiao, Daxin Jiang, Linjun Yang, Rangan Majumder, Furu Wei

AI总结:

提出LLMA加速器,通过复用参考文本片段并并行验证,在保持与贪婪解码结果相同的前提下,实现大语言模型推理超过2倍的无损加速。

摘要:

我们提出LLMA,一种利用参考无损加速大语言模型(LLM)推理的加速器。LLMA的动机是观察到LLM的解码结果与许多现实场景中可用的参考(例如,检索到的文档)之间存在大量相同的文本片段。LLMA首先从参考中选择一个文本片段,将其token复制到解码器,然后在一个解码步骤内并行高效地检查这些token作为解码结果的适当性。改进的计算并行性使LLMA在许多上下文参考与输出存在显著重叠的实际生成场景(例如,搜索引擎和多轮对话)中,实现了超过2倍的LLM加速,且生成结果与贪婪解码完全相同。

英文摘要:

We propose LLMA, an LLM accelerator to losslessly speed up Large Language Model (LLM) inference with references. LLMA is motivated by the observation that there are abundant identical text spans between the decoding result by an LLM and the reference that is available in many real world scenarios (e.g., retrieved documents). LLMA first selects a text span from the reference and copies its tokens to the decoder and then efficiently checks the tokens' appropriateness as the decoding result in parallel within one decoding step. The improved computational parallelism allows LLMA to achieve over 2x speed-up for LLMs with identical generation results as greedy decoding in many practical generation scenarios where significant overlap between in-context reference and outputs exists (e.g., search engines and multi-turn conversations).

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

↑