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

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

29 Feb 2024arXiv:2402.19427archive 2025-07-28

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

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.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2402.19427")

Code

Syntology Ran 0 of 10 code samples harvested from 2 repositories linked to this paper; 10 have no recorded run.

By repository: community (archive-listed): 10 samples from 2 repositories, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

google-deepmind/recurrentgemma mentioned on GitHubjaxApache-2.0 report
google-gemini/gemma-cookbook mentioned on GitHubApache-2.0 report
knotgrass/Griffin mentioned on GitHubpytorch report
proger/hippogriff mentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

10 samples harvested; 0 ran; 0 honoured the contract we drafted; 10 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

10unverified

Licence: 0 of the 10 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

export_for_matformer_lab google-gemini/gemma-cookbook/Guides/Gemma-3n-Submodels/custom_slicing_configs.py community (archive-listed) unverified Apache-2.0 (permissive) · 28867e57625ea792 · report
extract_substring google-gemini/gemma-cookbook/Demos/spoken-language-tasks/k-mail-replier/k_mail_replier/models/gemma.py community (archive-listed) unverified Apache-2.0 (permissive) · a44998324fc779df · report
get_config_for_deployment google-gemini/gemma-cookbook/Guides/Gemma-3n-Submodels/custom_slicing_configs.py community (archive-listed) unverified Apache-2.0 (permissive) · ee6bd7400c685050 · report
list_checkpoints proger/hippogriff/train_init.py community (archive-listed) unverified MIT (permissive) · 70b3d78ffd9316ee · report
load_checkpoint proger/hippogriff/train_init.py community (archive-listed) unverified MIT (permissive) · 1d8a8cadca2d8282 · report
print_weights proger/hippogriff/train_diagnostics.py community (archive-listed) unverified MIT (permissive) · 903df3e710bd40d2 · report
summarize_gradients proger/hippogriff/train_diagnostics.py community (archive-listed) unverified MIT (permissive) · 1a3e30d8ca827338 · report
trim_response google-gemini/gemma-cookbook/Demos/business-email-assistant/email-processing-webapp/models/gemma.py community (archive-listed) unverified Apache-2.0 (permissive) · 3366f12b87851a4f · report
trim_response google-gemini/gemma-cookbook/Demos/personal-code-assistant/gemma-web-service/gemma_service/gemma_model.py community (archive-listed) unverified Apache-2.0 (permissive) · f820e6681777dded · report
validate_config google-gemini/gemma-cookbook/Guides/Gemma-3n-Submodels/custom_slicing_configs.py community (archive-listed) unverified Apache-2.0 (permissive) · 37899b9ccd873f9a · report

Tasks

Language ModellingMamba

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Gated Linear UnitGlobal-Local AttentionMulti-Query AttentionRMSNorm

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections