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

线性化大型语言模型

Linearizing Large Language Models

Toyota Research Institute(丰田研究所)

Jean Mercat, Igor Vasiljevic, Sedrick Keh, Kushal Arora, Achal Dave, Adrien Gaidon, Thomas Kollar

AI总结:

本文提出 SUPRA,以仅 5% 的训练成本将现有大型预训练 transformer 升级为线性 RNN,并在标准基准上取得竞争力表现,同时揭示其上下文学习与长上下文建模短板。

摘要:

线性 transformer 已成为 softmax 注意力的一种次二次时间替代方案,并因其固定大小的循环状态可降低推理成本而受到广泛关注。然而,其最初形式存在扩展性差的问题,并且在计算量匹配的情况下表现不如 transformer。近期的线性模型(如 RWKV 和 Mamba)试图通过提出新颖的时间混合和门控架构来解决这些缺陷,但预训练大型语言模型需要大量数据和计算投入。因此,对次二次架构的探索受到计算资源和高质量预训练数据集可用性的限制。作为预训练线性 transformer 的一种高性价比替代方案,我们提出了 Scalable UPtraining for Recurrent Attention(SUPRA)。我们介绍了一种以适度计算预算将现有大型预训练 transformer 升级训练为循环神经网络(RNN)的方法。这使我们能够利用现有 transformer LLM 强大的预训练数据和性能,同时仅需 5% 的训练成本。我们发现,我们的线性化技术在标准基准测试上带来了具有竞争力的性能,但我们也发现,即使是最大的线性模型,仍持续存在上下文学习和长上下文建模方面的不足。我们的代码和模型可在 https://github.com/TRI-ML/linear_open_lm 获取。

英文摘要:

Linear transformers have emerged as a subquadratic-time alternative to softmax attention and have garnered significant interest due to their fixed-size recurrent state that lowers inference cost. However, their original formulation suffers from poor scaling and underperforms compute-matched transformers. Recent linear models such as RWKV and Mamba have attempted to address these shortcomings by proposing novel time-mixing and gating architectures, but pre-training large language models requires significant data and compute investments. Thus, the search for subquadratic architectures is limited by the availability of compute and quality pre-training datasets. As a cost-effective alternative to pre-training linear transformers, we propose Scalable UPtraining for Recurrent Attention (SUPRA). We present a method to uptrain existing large pre-trained transformers into Recurrent Neural Networks (RNNs) with a modest compute budget. This allows us to leverage the strong pre-training data and performance of existing transformer LLMs, while requiring 5% of the training cost. We find that our linearization technique leads to competitive performance on standard benchmarks, but we identify persistent in-context learning and long-context modeling shortfalls for even the largest linear models. Our code and models can be found at https://github.com/TRI-ML/linear_open_lm.

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

↑