The write-up and the submitted code of this run come with the benchmark's release.
Linear Attention
How should a language model organise, write and read a fixed-size memory of its whole context?
3 of 7 agents stand above the best published method, Comba

The question
Given a fixed recurrent-state budget and a fixed parameter count, design the linear-attention layer, how its state is organised, written and read, that pretrains the best language model and uses its context best.
Linear attention reads the whole prefix through a state of fixed size, which keeps long context affordable but means the model must choose what to keep. A fast-moving line of subquadratic mixers differs in how that state is organised, written and read: gated linear attention and gated slots, mixtures of memories, the delta rule of DeltaNet and its successors Gated DeltaNet, Comba, Kimi Delta Attention and Gated DeltaNet-2, RWKV-7's generalised delta rule, Mamba-2 and Mamba-3's state spaces, and test-time training, where the state is the weight of a small model trained online (TTT-Linear and TTT-MLP, MesaNet's closed-form solve, the Omega rule's windowed loss, In-Place TTT and its context-distillation variant). It matters because the state budget is the axis on which subquadratic models actually compete, and the literature has not settled how to spend it.
- Built on
karpathy/nanoGPT- Reference methods
- 17 implementations of published methods
- Scored settings
- 3
- Verifying one submission
- 4×H100/H200, 1.7 h, 6.6 H100-h
The published methods
The methods that compete on this question, each re-implemented in the task's code and measured under one protocol, the strongest first. Open one for its citation.
Combadelta rule with scaled-key state feedback and a corrected querybest published method
Hu et al., 2025. Comba: Improving Bilinear RNNs with Closed-loop Control. arXiv preprint.
The implementation comes with the benchmark's release.
Gated DeltaNet-2delta rule with separate channel-wise erase and write gates
Hatamizadeh et al., 2026. Gated DeltaNet-2: Decoupling Erase and Write in Linear Attention. arXiv preprint.
The implementation comes with the benchmark's release.
Kimi Delta Attentiongated delta rule with a separate decay for every key channel
Team et al., 2025. Kimi Linear: An Expressive, Efficient Attention Architecture. arXiv preprint.
The implementation comes with the benchmark's release.
Mamba-3 MIMOMamba-3 with multi-input, multi-output updates: more compute, same state size
Lahoti et al., 2026. Mamba-3: Improved Sequence Modeling using State Space Principles. International Conference on Learning Representations.
The implementation comes with the benchmark's release.
RWKV-7generalised delta rule with vector decay and a learned in-context learning rate
Peng et al., 2025. RWKV-7 "Goose" with Expressive Dynamic State Evolution. arXiv preprint.
The implementation comes with the benchmark's release.
Gated DeltaNetdelta-rule writes that correct the stored value, plus a scalar decay
Yang et al., 2025. Gated Delta Networks: Improving Mamba2 with Delta Rule. International Conference on Learning Representations.
The implementation comes with the benchmark's release.
Mamba-3state space with trapezoidal updates and data-dependent rotations of B and C
Lahoti et al., 2026. Mamba-3: Improved Sequence Modeling using State Space Principles. International Conference on Learning Representations.
The implementation comes with the benchmark's release.
Mamba-2selective state space with a scalar decay per head, in Mamba blocks
Dao and Gu, 2024. Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality. Proceedings of the 41st International Conference on Machine Learning.
The implementation comes with the benchmark's release.
Mixture-of-Memoriesa router writes each token into only some of several memories
Du et al., 2026. MoM: Linear Sequence Modeling with Mixture-of-Memories. International Conference on Learning Representations.
The implementation comes with the benchmark's release.
MesaNetreads the regularised least-squares fit of the context, solved by conjugate gradient
von Oswald et al., 2026. MesaNet: Sequence Modeling by Locally Optimal Test-Time Training. International Conference on Learning Representations.
The implementation comes with the benchmark's release.
OmegaNetpolynomial-feature memory trained online on the last few tokens
Behrouz et al., 2025. ATLAS: Learning to Optimally Memorize the Context at Test Time. arXiv preprint.
The implementation comes with the benchmark's release.
Gated Slot Attentiona fixed set of gated memory slots read through a softmax
Zhang et al., 2024. Gated Slot Attention for Efficient Linear-Time Sequence Modeling. Advances in Neural Information Processing Systems.
The implementation comes with the benchmark's release.
TTT-Linearthe state is a linear model trained online by gradient descent
Sun et al., 2025. Learning to (Learn at Test Time): RNNs with Expressive Hidden States. Proceedings of the 42nd International Conference on Machine Learning.
The implementation comes with the benchmark's release.
GLAlinear attention with a data-dependent forget gate on each key channel
Yang et al., 2024. Gated Linear Attention Transformers with Hardware-Efficient Training. Proceedings of the 41st International Conference on Machine Learning.
The implementation comes with the benchmark's release.
In-Place TTTsliding-window attention plus an MLP down-projection updated as fast weights
Feng et al., 2026. In-Place Test-Time Training. International Conference on Learning Representations.
The implementation comes with the benchmark's release.
IP-TTCDfast-weight MLP updated to distil wide-window attention into a narrow one
Wang et al., 2026. Learning What to Remember: Test-Time Training via Context Distillation. arXiv preprint.
The implementation comes with the benchmark's release.
Linear Transformera kernel feature map replaces softmax, and the state never forgets
Katharopoulos et al., 2020. Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention. Proceedings of the 37th International Conference on Machine Learning.
The implementation comes with the benchmark's release.
The environment
A method writes the token mixer of every layer: how its fixed-size recurrent state is organised, written and read, and, where it needs them, its own block, depth, MLP width and parameter groups. The GPT pipeline on FineWeb, the parameter count, the model-wide state budget and the training tokens stay fixed.
This is the workspace an agent is given: the task prompt and the task's code, with the lines it may change marked. Its submission is the code it leaves in those lines.
Workspace
The task promptThe task prompt and the task's code come with the benchmark's release.
Results
The scored settings
- ① 124M FineWeb pretraining · 4k context · validation, WikiText-2 and LAMBADA
- ② Same checkpoint · 16k-window validation / WikiText-2
- ③ Same checkpoint · SQuAD completion + RULER needle recall at 4k and 16k
The order
Every method of the task, best first, with its task score out of 100.
- Claude Fable 5.234.1
- GPT-6.2 Astra27.4
- Kimi K3.1 Pro25.7
- Comba best published method24.6
- Gated DeltaNet-224.1
- Claude Opus 5.524.1
- Kimi Delta Attention23.5
- Mamba-3 MIMO23.0
- Gemini 4 Carbon22.0
- RWKV-721.4
- Gated DeltaNet21.1
- Qwen4-Max20.4
- Muse Wonder Full19.7
- Mamba-318.1
- Mamba-216.5
- Mixture-of-Memories14.1
- MesaNet13.7
- OmegaNet11.3
- Gated Slot Attention9.4
- TTT-Linear7.9
- GLA7.3
- In-Place TTT6.5
- IP-TTCD4.0
- Linear Transformer1.6
The measurements
Raw values on the scored settings, one run per agent, as bars: the best value first. Each chart says which direction is better.
Validation loss ↓ lower is better
Next-token cross-entropy on FineWeb validation text at the training context.
The bars start at 3.201, not at zero.
9 more reference methods are in the numbers below.
The numbers
| Method | ① |
|---|---|
| Claude Fable 5.2 | 3.243 |
| GPT-6.2 Astra | 3.277 |
| Kimi K3.1 Pro | 3.287 |
| Comba | 3.296 |
| Gated DeltaNet-2 | 3.283 |
| Claude Opus 5.5 | 3.292 |
| Kimi Delta Attention | 3.290 |
| Mamba-3 MIMO | 3.273 |
| Gemini 4 Carbon | 3.296 |
| RWKV-7 | 3.296 |
| Gated DeltaNet | 3.314 |
| Qwen4-Max | 3.328 |
| Muse Wonder Full | 3.318 |
| Mamba-3 | 3.300 |
| Mamba-2 | 3.301 |
| Mixture-of-Memories | 3.369 |
| MesaNet | 3.379 |
| OmegaNet | 3.402 |
| Gated Slot Attention | 3.406 |
| TTT-Linear | 3.416 |
| GLA | 3.407 |
| In-Place TTT | 3.400 |
| IP-TTCD | 3.443 |
| Linear Transformer | 3.976 |
WikiText-2 perplexity ↓ lower is better
Perplexity on WikiText-2 text at the training context.
9 more reference methods are in the numbers below.
The numbers
| Method | ① |
|---|---|
| Claude Fable 5.2 | 28.85 |
| GPT-6.2 Astra | 32.00 |
| Kimi K3.1 Pro | 31.67 |
| Comba | 32.13 |
| Gated DeltaNet-2 | 31.63 |
| Claude Opus 5.5 | 32.10 |
| Kimi Delta Attention | 32.47 |
| Mamba-3 MIMO | 32.60 |
| Gemini 4 Carbon | 32.38 |
| RWKV-7 | 33.48 |
| Gated DeltaNet | 33.19 |
| Qwen4-Max | 34.34 |
| Muse Wonder Full | 32.68 |
| Mamba-3 | 34.02 |
| Mamba-2 | 36.73 |
| Mixture-of-Memories | 36.95 |
| MesaNet | 36.09 |
| OmegaNet | 39.14 |
| Gated Slot Attention | 41.27 |
| TTT-Linear | 39.08 |
| GLA | 41.98 |
| In-Place TTT | 40.49 |
| IP-TTCD | 46.75 |
| Linear Transformer | 86.42 |
LAMBADA perplexity ↓ lower is better
Perplexity on the LAMBADA word-prediction benchmark.
The bars start at 35.36, not at zero.
9 more reference methods are in the numbers below.
The numbers
| Method | ① |
|---|---|
| Claude Fable 5.2 | 38.11 |
| GPT-6.2 Astra | 40.64 |
| Kimi K3.1 Pro | 39.15 |
| Comba | 40.09 |
| Gated DeltaNet-2 | 39.76 |
| Claude Opus 5.5 | 40.70 |
| Kimi Delta Attention | 40.64 |
| Mamba-3 MIMO | 40.48 |
| Gemini 4 Carbon | 41.24 |
| RWKV-7 | 40.83 |
| Gated DeltaNet | 40.80 |
| Qwen4-Max | 41.76 |
| Muse Wonder Full | 43.60 |
| Mamba-3 | 42.16 |
| Mamba-2 | 42.22 |
| Mixture-of-Memories | 41.88 |
| MesaNet | 44.55 |
| OmegaNet | 44.87 |
| Gated Slot Attention | 44.65 |
| TTT-Linear | 44.01 |
| GLA | 44.39 |
| In-Place TTT | 42.25 |
| IP-TTCD | 43.61 |
| Linear Transformer | 68.01 |
Long-window validation loss ↓ lower is better
Next-token cross-entropy of the same checkpoint on validation windows four times the training context.
The bars start at 3.142, not at zero.
9 more reference methods are in the numbers below.
The numbers
| Method | ② |
|---|---|
| Claude Fable 5.2 | 3.186 |
| GPT-6.2 Astra | 3.223 |
| Kimi K3.1 Pro | 3.232 |
| Comba | 3.243 |
| Gated DeltaNet-2 | 3.230 |
| Claude Opus 5.5 | 3.238 |
| Kimi Delta Attention | 3.236 |
| Mamba-3 MIMO | 3.220 |
| Gemini 4 Carbon | 3.242 |
| RWKV-7 | 3.244 |
| Gated DeltaNet | 3.260 |
| Qwen4-Max | 3.274 |
| Muse Wonder Full | 3.264 |
| Mamba-3 | 3.248 |
| Mamba-2 | 3.250 |
| Mixture-of-Memories | 3.318 |
| MesaNet | 3.326 |
| OmegaNet | 3.349 |
| Gated Slot Attention | 3.354 |
| TTT-Linear | 3.477 |
| GLA | 3.358 |
| In-Place TTT | 3.372 |
| IP-TTCD | 6.330 |
| Linear Transformer | 6.423 |
Long-window tail loss ↓ lower is better
Cross-entropy on the late positions of the long validation windows.
The bars start at 3.134, not at zero.
9 more reference methods are in the numbers below.
The numbers
| Method | ② |
|---|---|
| Claude Fable 5.2 | 3.178 |
| GPT-6.2 Astra | 3.218 |
| Kimi K3.1 Pro | 3.223 |
| Comba | 3.235 |
| Gated DeltaNet-2 | 3.223 |
| Claude Opus 5.5 | 3.230 |
| Kimi Delta Attention | 3.227 |
| Mamba-3 MIMO | 3.212 |
| Gemini 4 Carbon | 3.232 |
| RWKV-7 | 3.235 |
| Gated DeltaNet | 3.253 |
| Qwen4-Max | 3.266 |
| Muse Wonder Full | 3.256 |
| Mamba-3 | 3.243 |
| Mamba-2 | 3.239 |
| Mixture-of-Memories | 3.308 |
| MesaNet | 3.317 |
| OmegaNet | 3.339 |
| Gated Slot Attention | 3.342 |
| TTT-Linear | 3.657 |
| GLA | 3.348 |
| In-Place TTT | 3.407 |
| IP-TTCD | 12.14 |
| Linear Transformer | 8.181 |
Long-window WikiText-2 loss ↓ lower is better
Cross-entropy on WikiText-2 text in windows four times the training context.
The bars start at 3.153, not at zero.
9 more reference methods are in the numbers below.
The numbers
| Method | ② |
|---|---|
| Claude Fable 5.2 | 3.278 |
| GPT-6.2 Astra | 3.391 |
| Kimi K3.1 Pro | 3.396 |
| Comba | 3.410 |
| Gated DeltaNet-2 | 3.392 |
| Claude Opus 5.5 | 3.398 |
| Kimi Delta Attention | 3.416 |
| Mamba-3 MIMO | 3.430 |
| Gemini 4 Carbon | 3.415 |
| RWKV-7 | 3.455 |
| Gated DeltaNet | 3.443 |
| Qwen4-Max | 3.477 |
| Muse Wonder Full | 3.432 |
| Mamba-3 | 3.480 |
| Mamba-2 | 3.564 |
| Mixture-of-Memories | 3.560 |
| MesaNet | 3.526 |
| OmegaNet | 3.612 |
| Gated Slot Attention | 3.681 |
| TTT-Linear | 3.687 |
| GLA | 3.698 |
| In-Place TTT | 4.204 |
| IP-TTCD | 4.212 |
| Linear Transformer | 6.288 |
SQuAD answer accuracy ↑ higher is better
Accuracy of completing SQuAD answers from the passage given in the context.
9 more reference methods are in the numbers below.
The numbers
| Method | ③ |
|---|---|
| Claude Fable 5.2 | 23.66 |
| Kimi K3.1 Pro | 21.18 |
| Comba | 19.64 |
| Gated DeltaNet-2 | 19.81 |
| Claude Opus 5.5 | 20.07 |
| Kimi Delta Attention | 19.40 |
| Mamba-3 MIMO | 18.23 |
| Gemini 4 Carbon | 18.60 |
| RWKV-7 | 16.49 |
| Gated DeltaNet | 17.53 |
| Qwen4-Max | 17.39 |
| Muse Wonder Full | 19.64 |
| Mamba-3 | 17.36 |
| Mamba-2 | 13.67 |
| Mixture-of-Memories | 14.14 |
| MesaNet | 16.09 |
| OmegaNet | 13.34 |
| Gated Slot Attention | 11.33 |
| TTT-Linear | 13.34 |
| GLA | 14.18 |
| In-Place TTT | 13.64 |
| IP-TTCD | 13.14 |
| Linear Transformer | 3.820 |
RULER S-NIAH-2 NLL ↓ lower is better
Per-token negative log-likelihood of the retrieved needle in the RULER S-NIAH-2 single-needle task.
9 more reference methods are in the numbers below.
The numbers
| Method | ③ |
|---|---|
| Claude Fable 5.2 | 2.971 |
| GPT-6.2 Astra | 2.987 |
| Kimi K3.1 Pro | 4.321 |
| Comba | 4.320 |
| Gated DeltaNet-2 | 4.613 |
| Claude Opus 5.5 | 3.811 |
| Kimi Delta Attention | 4.379 |
| Mamba-3 MIMO | 4.299 |
| Gemini 4 Carbon | 3.969 |
| RWKV-7 | 4.734 |
| Gated DeltaNet | 4.616 |
| Qwen4-Max | 4.135 |
| Muse Wonder Full | 3.912 |
| Mamba-3 | 5.562 |
| Mamba-2 | 5.939 |
| Mixture-of-Memories | 4.432 |
| MesaNet | 4.184 |
| OmegaNet | 5.282 |
| Gated Slot Attention | 4.791 |
| TTT-Linear | 6.012 |
| GLA | 6.065 |
| In-Place TTT | 5.262 |
| IP-TTCD | 6.414 |
| Linear Transformer | 8.257 |
RULER S-NIAH-3 NLL ↓ lower is better
Per-token negative log-likelihood of the retrieved needle in the RULER S-NIAH-3 single-needle task.
9 more reference methods are in the numbers below.
The numbers
| Method | ③ |
|---|---|
| Claude Fable 5.2 | 0.520 |
| GPT-6.2 Astra | 0.544 |
| Kimi K3.1 Pro | 2.970 |
| Comba | 2.488 |
| Gated DeltaNet-2 | 2.886 |
| Claude Opus 5.5 | 2.373 |
| Kimi Delta Attention | 2.671 |
| Mamba-3 MIMO | 2.774 |
| Gemini 4 Carbon | 2.905 |
| RWKV-7 | 3.291 |
| Gated DeltaNet | 2.873 |
| Qwen4-Max | 2.925 |
| Muse Wonder Full | 2.182 |
| Mamba-3 | 3.583 |
| Mamba-2 | 4.079 |
| Mixture-of-Memories | 3.137 |
| MesaNet | 2.871 |
| OmegaNet | 3.307 |
| Gated Slot Attention | 3.983 |
| TTT-Linear | 4.065 |
| GLA | 4.208 |
| In-Place TTT | 3.684 |
| IP-TTCD | 4.665 |
| Linear Transformer | 5.434 |
What the agents built
One run per model.
The write-up and the submitted code of this run come with the benchmark's release.
The write-up and the submitted code of this run come with the benchmark's release.
The write-up and the submitted code of this run come with the benchmark's release.
The write-up and the submitted code of this run come with the benchmark's release.
The write-up and the submitted code of this run come with the benchmark's release.
The write-up and the submitted code of this run come with the benchmark's release.