arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.19427cs.LGcs.CL
收藏

Griffin:融合门控线性循环与局部注意力以构建高效语言模型

Griffin: Mixing Gated Linear Recurrences with Local Attention for Efficient Language Models

Google DeepMind(谷歌DeepMind)
Soham De, Samuel L. Smith, Anushan Fernando, Aleksandar Botev, George Cristian-Muraru, Albert Gu, Ruba Haroun, Leonard Berrada, Yutian Chen, Srivatsan Srinivasa… 展开作者

Soham De, Samuel L. Smith, Anushan Fernando, Aleksandar Botev, George Cristian-Muraru, Albert Gu, Ruba Haroun, Leonard Berrada, Yutian Chen, Srivatsan Srinivasan, Guillaume Desjardins, Arnaud Doucet, David Budden, Yee Whye Teh, Razvan Pascanu, Nando De Freitas, Caglar Gulcehre

AI总结:

本文提出 Hawk 与混合模型 Griffin,通过门控线性循环和局部注意力实现高效语言建模,在更少训练 token 下达到可比性能,并支持长序列外推与 14B 参数扩展。

摘要:

循环神经网络(RNN)具有快速推理能力,并能在长序列上高效扩展,但它们难以训练且不易扩展。我们提出了 Hawk,这是一种采用门控线性循环的 RNN;还提出了 Griffin,这是一种将门控线性循环与局部注意力相结合的混合模型。Hawk 在下游任务上超过了 Mamba 已报告的性能,而 Griffin 尽管训练所用 token 数量少了 6 倍以上,却达到了与 Llama-2 相当的性能。我们还表明,Griffin 能够在显著长于训练期间所见长度的序列上进行外推。我们的模型在训练期间具备与 Transformers 相当的硬件效率,而在推理期间具有更低的延迟和显著更高的吞吐量。我们将 Griffin 扩展到 14B 参数,并解释了如何对模型进行分片以实现高效的分布式训练。

英文摘要:

Recurrent neural networks (RNNs) have fast inference and scale efficiently on long sequences, but they are difficult to train and hard to scale. We propose Hawk, an RNN with gated linear recurrences, and Griffin, a hybrid model that mixes gated linear recurrences with local attention. Hawk exceeds the reported performance of Mamba on downstream tasks, while Griffin matches the performance of Llama-2 despite being trained on over 6 times fewer tokens. We also show that Griffin can extrapolate on sequences significantly longer than those seen during training. Our models match the hardware efficiency of Transformers during training, and during inference they have lower latency and significantly higher throughput. We scale Griffin up to 14B parameters, and explain how to shard our models for efficient distributed training.

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

↑