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

Think Big, Generate Quick: LLM-to-SLM 用于快速自回归解码

Think Big, Generate Quick: LLM-to-SLM for Fast Autoregressive Decoding

Hasso Plattner Institute for Digital Engineering, University of Potsdam(波茨坦大学哈索·普拉特纳数字工程研究所);Qualcomm AI Research(高通人工智能研究);University of Amsterdam(阿姆斯特丹大学)

Benjamin Bergner, Andrii Skliar, Amelie Royer, Tijmen Blankevoort, Yuki Asano, Babak Ehteshami Bejnordi

AI总结:

提出LLM-to-SLM混合解码方法,利用冻结大模型并行编码提示,引导小模型高效生成,在多个基准上实现高达4倍加速,性能损失仅1-2%。

摘要:

大型语言模型(LLMs)在实践中已变得无处不在,并广泛用于翻译、摘要和指令遵循等生成任务。然而,它们庞大的规模和对自回归解码的依赖增加了部署成本,并使其在延迟关键型应用中的使用复杂化。在这项工作中,我们提出了一种混合方法,结合不同规模的语言模型,以提高自回归解码的效率,同时保持高性能。我们的方法利用一个预训练的冻结LLM,该模型并行编码所有提示词元一次,并使用得到的表示来调节和引导一个小型语言模型(SLM),然后该SLM更高效地生成响应。我们研究了编码器-解码器LLM与来自不同模型家族的编码器-解码器和仅解码器SLM的组合,并且仅需要微调SLM。在多个基准上的实验显示,与LLM相比,速度提升高达4倍,而翻译和摘要任务的性能损失仅为1-2%。

英文摘要:

Large language models (LLMs) have become ubiquitous in practice and are widely used for generation tasks such as translation, summarization and instruction following. However, their enormous size and reliance on autoregressive decoding increase deployment costs and complicate their use in latency-critical applications. In this work, we propose a hybrid approach that combines language models of different sizes to increase the efficiency of autoregressive decoding while maintaining high performance. Our method utilizes a pretrained frozen LLM that encodes all prompt tokens once in parallel, and uses the resulting representations to condition and guide a small language model (SLM), which then generates the response more efficiently. We investigate the combination of encoder-decoder LLMs with both encoder-decoder and decoder-only SLMs from different model families and only require fine-tuning of the SLM. Experiments with various benchmarks show substantial speedups of up to $4\times$, with minor performance penalties of $1-2\%$ for translation and summarization tasks compared to the LLM.

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

↑