Griffin: Mixing Gated Linear Recurrences with Local Attention for
  Efficient Language Models
Authors: name: Soham De; name: Samuel L. Smith; name: Anushan Fernando; name: Aleksandar Botev; name: George Cristian-Muraru; name: Albert Gu; name: Ruba Haroun; name: Leonard Berrada; name: Yutian Chen; name: Srivatsan Srinivasan; name: Guillaume Desjardins; name: Arnaud Doucet; name: David Budden; name: Yee Whye Teh; name: Razvan Pascanu; name: Nando De Freitas; name: Caglar Gulcehre
Published: 2024-02-29 18:24:46

Abstract: 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.