Papers › Hungry Hungry Hippos: Towards Language Modeling with State Space Models

Hungry Hungry Hippos: Towards Language Modeling with State Space Models

28 Dec 2022arXiv:2212.14052archive 2025-07-28

Daniel Y. Fu, Tri Dao, Khaled K. Saab, Armin W. Thomas, Atri Rudra, Christopher Ré

State space models (SSMs) have demonstrated state-of-the-art sequence modeling performance in some modalities, but underperform attention in language modeling. Moreover, despite scaling nearly linearly in sequence length instead of quadratically, SSMs are still slower than Transformers due to poor hardware utilization. In this paper, we make progress on understanding the expressivity gap between SSMs and attention in language modeling, and on reducing the hardware barrier between SSMs and attention. First, we use synthetic language modeling tasks to understand the gap between SSMs and attention. We find that existing SSMs struggle with two capabilities: recalling earlier tokens in the sequence and comparing tokens across the sequence. To understand the impact on language modeling, we propose a new SSM layer, H3, that is explicitly designed for these abilities. H3 matches attention on the synthetic languages and comes within 0.4 PPL of Transformers on OpenWebText. Furthermore, a hybrid 125M-parameter H3-attention model that retains two attention layers surprisingly outperforms Transformers on OpenWebText by 1.0 PPL. Next, to improve the efficiency of training SSMs on modern hardware, we propose FlashConv. FlashConv uses a fused block FFT algorithm to improve efficiency on sequences up to 8K, and introduces a novel state passing algorithm that exploits the recurrent properties of SSMs to scale to longer sequences. FlashConv yields 2× speedup on the long-range arena benchmark and allows hybrid language models to generate text 2.4× faster than Transformers. Using FlashConv, we scale hybrid H3-attention language models up to 2.7B parameters on the Pile and find promising initial results, achieving lower perplexity than Transformers and outperforming Transformers in zero- and few-shot learning on a majority of tasks in the SuperGLUE benchmark.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

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="2212.14052")

Code

Syntology Ran 7 of 15 code samples harvested from 2 repositories linked to this paper; 8 have no recorded run. Of those that ran: 1 ran · honoured contract; 3 ran · our draft was wrong; 1 ran · fixture could not drive it; 2 ran with no contract checked.

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

hazyresearch/h3 officialmentioned in papermentioned on GitHubpytorchApache-2.0 report
hazyresearch/safari mentioned on GitHubpytorchApache-2.0 report
lindermanlab/S5 mentioned on GitHubjaxMIT 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

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

1ran · honoured contract
3ran · our draft was wrong
1ran · fixture could not drive it
2ran
8unverified

Licence: 0 of the 15 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.

mul_sum HazyResearch/H3/src/models/ssm/h3.py official repository ran · fixture could not drive it Apache-2.0 (permissive) · 5dd28d20c60f0c19 · report
EMAKernel hazyresearch/safari/src/models/sequence/h3.py community (archive-listed) ran · metamorphic tier: deterministic fingerprinted Apache-2.0 (permissive) · 497dbc1b6483fce5 · report
SSKernelShift hazyresearch/safari/src/models/sequence/h3.py community (archive-listed) ran fingerprinted Apache-2.0 (permissive) · ca63d87a582adba1 · report
nplr hazyresearch/safari/src/models/sequence/h3.py community (archive-listed) ran · our draft was wrong Apache-2.0 (permissive) · cde6f4e2d1c79e3a · report
power hazyresearch/safari/src/models/sequence/h3.py community (archive-listed) ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 55a38587423268a5 · report
rank_correction hazyresearch/safari/src/models/sequence/h3.py community (archive-listed) ran · honoured contract Apache-2.0 (permissive) · 7f226e8168260082 · report
transition hazyresearch/safari/src/models/sequence/h3.py community (archive-listed) ran · our draft was wrong Apache-2.0 (permissive) · 93675235174e1ee4 · report
H3 hazyresearch/safari/src/models/sequence/h3.py community (archive-listed) unverified Apache-2.0 (permissive) · b100cfc9148d4a59 · report
SSKernel hazyresearch/safari/src/models/sequence/h3.py community (archive-listed) unverified Apache-2.0 (permissive) · 1d9eb34a580a6143 · report
SSKernelDiag hazyresearch/safari/src/models/sequence/h3.py community (archive-listed) unverified Apache-2.0 (permissive) · 60be78d8667c0da7 · report
combination hazyresearch/safari/src/models/sequence/h3.py community (archive-listed) unverified Apache-2.0 (permissive) · c73230013cf47ccb · report
dplr hazyresearch/safari/src/models/sequence/h3.py community (archive-listed) unverified Apache-2.0 (permissive) · 871ae87aa2c2ffb6 · report
log_vandermonde hazyresearch/safari/src/models/sequence/h3.py community (archive-listed) unverified Apache-2.0 (permissive) · 37bc70e26a2b9b9e · report
log_vandermonde_transpose hazyresearch/safari/src/models/sequence/h3.py community (archive-listed) unverified Apache-2.0 (permissive) · 2f58a2eaf4ce01c9 · report
ssm hazyresearch/safari/src/models/sequence/h3.py community (archive-listed) unverified Apache-2.0 (permissive) · 3d83038bb3d6c578 · report

Tasks

Coreference ResolutionFew-Shot LearningLanguage ModelingLanguage ModellingLong-range modelingNatural Language InferenceQuestion AnsweringState Space ModelsWord Sense Disambiguation

1 archive task tag without a task page not shown.

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Coreference Resolution Winograd Schema Challenge H3 125M (3-shot, rank classification) Accuracy 63.5 #46 of 82 Archive leaderboard report
Coreference Resolution Winograd Schema Challenge H3 125M (0-shot, rank classification) Accuracy 61.5 #55 of 82 Archive leaderboard report
Coreference Resolution Winograd Schema Challenge Hybrid H3 125M (3-shot, logit scoring) Accuracy 43.3 #78 of 82 Archive leaderboard report
Language Modelling The Pile Hybrid H3 125M Test perplexity 10.2 #29 of 39 Archive leaderboard report
Language Modelling The Pile Transformer 125M Test perplexity 10.7 #31 of 39 Archive leaderboard report
Language Modelling WikiText-103 Hybrid H3 (2.7B) Number of params 2700M #2 of 89 Archive leaderboard report
Language Modelling WikiText-103 Hybrid H3 (2.7B) Test perplexity 10.6 #2 of 89 Archive leaderboard report
Language Modelling WikiText-103 Hybrid H3 (1.3B) Number of params 1300M #6 of 89 Archive leaderboard report
Language Modelling WikiText-103 Hybrid H3 (1.3B) Test perplexity 12.5 #6 of 89 Archive leaderboard report
Language Modelling WikiText-103 Hybrid H3 (355M) Number of params 355M #18 of 89 Archive leaderboard report
Language Modelling WikiText-103 Hybrid H3 (355M) Test perplexity 16.9 #18 of 89 Archive leaderboard report
Language Modelling WikiText-103 Hybrid H3 125M Test perplexity 18.5 #38 of 89 Archive leaderboard report
Language Modelling WikiText-103 Hybrid H3 (125M) Number of params 125M #53 of 89 Archive leaderboard report
Language Modelling WikiText-103 Hybrid H3 (125M) Test perplexity 23.7 #53 of 89 Archive leaderboard report
Natural Language Inference RTE Hybrid H3 125M (0-shot, logit scoring) Accuracy 59.2% #74 of 90 Archive leaderboard report
Natural Language Inference RTE Hybrid H3 125M (3-shot, logit scoring) Accuracy 58.1% #77 of 90 Archive leaderboard report
Natural Language Inference RTE Hybrid H3 125M (3-shot, rank classification) Accuracy 58.1% #78 of 90 Archive leaderboard report
Natural Language Inference RTE H3 125M (0-shot, rank classification) Accuracy 53.1% #88 of 90 Archive leaderboard report
Natural Language Inference RTE H3 125M (3-shot, rank classification) Accuracy 52.3% #90 of 90 Archive leaderboard report
Question Answering BoolQ Hybrid H3 1.3B (0-shot, logit scoring) Accuracy 61.7 #52 of 65 Archive leaderboard report
Question Answering BoolQ Hybrid H3 2.7B (3-shot, logit scoring) Accuracy 60.6 #55 of 65 Archive leaderboard report
Question Answering BoolQ Hybrid H3 125M (0-shot, logit scoring) Accuracy 59.6 #59 of 65 Archive leaderboard report
Question Answering BoolQ Hybrid H3 125M (3-shot, logit scoring) Accuracy 56.1 #61 of 65 Archive leaderboard report
Question Answering BoolQ Hybrid H3 125M (3-shot, rank classification) Accuracy 56.1 #62 of 65 Archive leaderboard report
Question Answering COPA Hybrid H3 2.7B (0-shot, logit scoring) Accuracy 81 #35 of 60 Archive leaderboard report
Question Answering COPA Hybrid H3 2.7B (3-shot, logit scoring) Accuracy 77 #42 of 60 Archive leaderboard report
Question Answering COPA Hybrid H3 125M (0-shot, logit scoring) Accuracy 67 #51 of 60 Archive leaderboard report
Question Answering COPA Hybrid H3 125M (0-shot, rank classification) Accuracy 67 #52 of 60 Archive leaderboard report
Question Answering COPA H3 125M (0-shot, rank classification) Accuracy 51 #59 of 60 Archive leaderboard report
Question Answering MultiRC Hybrid H3 355M (3-shot, logit scoring) EM 59.7 #27 of 30 Archive leaderboard report
Question Answering MultiRC Hybrid H3 355M (0-shot, logit scoring) EM 59.5 #28 of 30 Archive leaderboard report
Question Answering MultiRC Hybrid H3 125M (0-shot, logit scoring) EM 51.4 #29 of 30 Archive leaderboard report
Question Answering MultiRC Hybrid H3 125M (3-shot, logit scoring) EM 48.9 #30 of 30 Archive leaderboard report
Word Sense Disambiguation Words in Context Hybrid H3 125M (0-shot, logit scoring) Accuracy 51.4 #29 of 37 Archive leaderboard report
Word Sense Disambiguation Words in Context Hybrid H3 125M (0-shot, rank classification) Accuracy 51.4 #30 of 37 Archive leaderboard report
Word Sense Disambiguation Words in Context Hybrid H3 125M (3-shot, logit scoring) Accuracy 49.1 #37 of 37 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

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