arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2207.07061cs.CLcs.LG
收藏

自信的自适应语言建模

Confident Adaptive Language Modeling

Google Research(谷歌研究院);CSAIL, MIT(麻省理工学院计算机科学与人工智能实验室)

Tal Schuster, Adam Fisch, Jai Gupta, Mostafa Dehghani, Dara Bahri, Vinh Q. Tran, Yi Tay, Donald Metzler

摘要:

基于transformer的大语言模型(LLM)的最新进展已经在许多任务中带来了显着的性能改进。这些收益伴随着模型大小的急剧增加,可能导致推理时的缓慢和昂贵的使用。然而,在实践中,由LLM生成的一系列生成是由不同程度的难度组成的。虽然某些预测确实受益于模型的全部容量,但其他延续则更加琐碎,可以通过减少计算来解决。在这项工作中,我们引入了自信的自适应语言建模(CALM),一个框架,用于动态分配每个输入和生成时间步长的不同计算量。提前退出解码涉及我们在这里解决的几个挑战,例如:(1)使用什么置信度;(2)将序列级约束连接到本地每个令牌退出决策;以及(3)由于先前令牌中的提前退出而返回丢失的隐藏表示。通过对三种不同的文本生成任务的理论分析和实证实验,我们证明了我们的框架在降低计算效率-高达$\times 3$的潜在加速-同时可证明保持高性能。

英文摘要:

Recent advances in Transformer-based large language models (LLMs) have led to significant performance improvements across many tasks. These gains come with a drastic increase in the models' size, potentially leading to slow and costly use at inference time. In practice, however, the series of generations made by LLMs is composed of varying levels of difficulty. While certain predictions truly benefit from the models' full capacity, other continuations are more trivial and can be solved with reduced compute. In this work, we introduce Confident Adaptive Language Modeling (CALM), a framework for dynamically allocating different amounts of compute per input and generation timestep. Early exit decoding involves several challenges that we address here, such as: (1) what confidence measure to use; (2) connecting sequence-level constraints to local per-token exit decisions; and (3) attending back to missing hidden representations due to early exits in previous tokens. Through theoretical analysis and empirical experiments on three diverse text generation tasks, we demonstrate the efficacy of our framework in reducing compute -- potential speedup of up to $\times 3$ -- while provably maintaining high performance.

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

↑