FantasticML

Tasks

Language models

Cross-Layer Reuse

Layers reusing each other's work, so a model trains on less compute or decodes with less memory.

2 of 7 agents stand above the best published method, YOCO

Collage for Cross-Layer Reuse

The question

With a mixture-of-experts decoder's parameters, training data and feed-forward sublayer fixed, design how its layers reuse one another's computation, by sharing keys and values or values across layers, letting tokens skip blocks or re-mixing the residual stream across depth, so that it reaches a given held-out loss with the least measured training compute, or keeps the smallest decoding state without losing held-out and long-document quality.

A standard decoder computes keys and values afresh in every layer and adds each sublayer's output to the residual stream unchanged, and the field asks how much of this work layers can share. A line of recent architectures reuses that computation instead: YOCO computes one global key-value set in the middle of the stack and lets the upper half attend to it, Cross-Layer Attention and FusedKV share or fuse keys and values across layers, ResFormer and SVFormer carry the first layer's values upward, Mixture-of-Depths lets most tokens skip a block, SambaY gates later layers with an earlier layer's attention output, and Hyper-Connections, mHC and Attention Residuals re-mix the residual stream across depth. They are usually compared at matched parameters or matched cache size; here the axis is the training compute actually spent. It matters because cross-layer reuse is one of the main ways to make a fixed model cheaper to train and serve, and the field compares the candidates on different axes.

Built on
marin-community/marin
Reference methods
12 implementations of published methods
Scored settings
1
Verifying one submission
3×H200, 5.8 h, 17 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.

YOCOgated-retention lower half, then one global key-value set shared abovebest published method

Sun et al., 2024. You Only Cache Once: Decoder-Decoder Architectures for Language Models. Advances in Neural Information Processing Systems.

The implementation comes with the benchmark's release.

SambaYupper layers gate a middle layer's attention output instead of attending

Ren et al., 2025. Decoder-Hybrid-Decoder Architecture for Efficient Reasoning with Long Generation. Advances in Neural Information Processing Systems.

The implementation comes with the benchmark's release.

YOCO, SWA self-decodersliding-window lower half, then one global key-value set shared above

Sun et al., 2024. You Only Cache Once: Decoder-Decoder Architectures for Language Models. Advances in Neural Information Processing Systems.

The implementation comes with the benchmark's release.

SVFormerall layers attend over the first layer's values

Zhou et al., 2025. Value Residual Learning. Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers).

The implementation comes with the benchmark's release.

AttnReseach sublayer input is a learned softmax mix of all earlier outputs

Team et al., 2026. Attention Residuals. arXiv preprint.

The implementation comes with the benchmark's release.

mHChyper-connections with residual mixing constrained to doubly stochastic matrices

Xie et al., 2026. mHC: Manifold-Constrained Hyper-Connections. arXiv preprint.

The implementation comes with the benchmark's release.

Hyper-Connectionsseveral parallel residual streams mixed by learned static and dynamic weights

Zhu et al., 2025. Hyper-Connections. International Conference on Learning Representations.

The implementation comes with the benchmark's release.

Mixture-of-Depthsa learned router lets most tokens skip a block

Raposo et al., 2024. Mixture-of-Depths: Dynamically allocating compute in transformer-based language models. arXiv preprint.

The implementation comes with the benchmark's release.

FusedKVupper layers' keys and values fused from the first and middle layers

Lin et al., 2026. Reconstructing KV Caches with Cross-Layer Fusion for Enhanced Transformers. International Conference on Learning Representations.

The implementation comes with the benchmark's release.

ResFormerevery layer's values averaged with the first layer's values

Zhou et al., 2025. Value Residual Learning. Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers).

The implementation comes with the benchmark's release.

Cross-Layer Attentionadjacent layer pairs share one set of keys and values

Brandon et al., 2024. Reducing Transformer Key-Value Cache Size with Cross-Layer Attention. Advances in Neural Information Processing Systems.

The implementation comes with the benchmark's release.

Sliding-window attentionevery layer attends only within a fixed local window

Beltagy et al., 2020. Longformer: The Long-Document Transformer. arXiv preprint.

The implementation comes with the benchmark's release.

The starter and the controls

Standard MoE decoderevery layer computes its own keys, values and residual updatesstarter

The implementation comes with the benchmark's release.

The environment

A method writes how the blocks of a fixed mixture-of-experts decoder are called and what they share: which layers compute their own keys, values and residual updates and which reuse another layer's, with any small mechanism parameters and the matching token-by-token decoding path. The decoder's weight shapes and initialisation, its feed-forward sublayer, the training data, the optimiser and its schedule are fixed, and only the peak learning rate may be set.

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 prompt

The task prompt

The task prompt and the task's code come with the benchmark's release.

Results

The scored settings

  1. ① Grug MoE scaling ladder of three sizes, 330M / 747M / 2.04B parameters trained on 0.66B / 1.44B / 4.42B tokens · the curve of held-out loss against measured training compute over the ladder, and, at the 747M size, the decoding state kept after an 8,192-token context, credited only while long-document quality holds

The order

Every method of the task, best first, with its task score out of 100.

  1. Claude Fable 5.29.4
  2. Claude Opus 5.58.5
  3. YOCO best published method7.5
  4. SambaY7.3
  5. Gemini 4 Carbon5.6
  6. Muse Wonder Full5.4
  7. GPT-6.2 Astra4.8
  8. Qwen4-Max4.4
  9. YOCO, SWA self-decoder4.2
  10. SVFormer2.5
  11. AttnRes2.5
  12. mHC2.3
  13. Hyper-Connections1.9
  14. Mixture-of-Depths1.7
  15. FusedKV1.6
  16. ResFormer0.5
  17. Cross-Layer Attention0.5
  18. Sliding-window attention0.1
  19. Standard MoE decoder starter0.0
  20. Kimi K3.1 Pro0.0

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.

Claude Fable 5.2Claude Opus 5.5GPT-6.2 AstraGemini 4 CarbonMuse Wonder FullKimi K3.1 ProQwen4-Maxpublished methodsthe best published method of the task

Paloma loss, small model ↓ lower is better

Language-modelling loss on the Paloma evaluation suite, macro-averaged over its sources, for the smallest model of the ladder.

① Grug MoE scaling ladder of three sizes, 330M / 747M / 2.04B par…lower is better ↓
GPT-6.2 Astra3.827
Hyper-Connections3.853
Muse Wonder Full3.856
Claude Opus 5.53.858
AttnRes3.861
Qwen4-Max3.866
mHC3.866
Sliding-window attention3.878
Claude Fable 5.23.880
ResFormer3.890
Gemini 4 Carbon3.891
Standard MoE decoder3.893
YOCO, SWA self-decoder3.921
SambaY3.934
YOCO3.937
Kimi K3.1 Pro4.027
3.7264.027

The bars start at 3.726, not at zero.

4 more reference methods are in the numbers below.

The numbers
Method①
Claude Fable 5.23.880
Claude Opus 5.53.858
YOCO3.937
SambaY3.934
Gemini 4 Carbon3.891
Muse Wonder Full3.856
GPT-6.2 Astra3.827
Qwen4-Max3.866
YOCO, SWA self-decoder3.921
SVFormer3.976
AttnRes3.861
mHC3.866
Hyper-Connections3.853
Mixture-of-Depths4.099
FusedKV3.938
ResFormer3.890
Cross-Layer Attention3.943
Sliding-window attention3.878
Standard MoE decoder3.893
Kimi K3.1 Pro4.027

Paloma loss, medium model ↓ lower is better

Language-modelling loss on the Paloma evaluation suite, macro-averaged over its sources, for the middle model of the ladder.

① Grug MoE scaling ladder of three sizes, 330M / 747M / 2.04B par…lower is better ↓
mHC3.533
AttnRes3.538
Claude Opus 5.53.546
Hyper-Connections3.551
Muse Wonder Full3.551
Claude Fable 5.23.561
ResFormer3.562
Standard MoE decoder3.569
Sliding-window attention3.572
FusedKV3.578
YOCO, SWA self-decoder3.587
Qwen4-Max3.589
Gemini 4 Carbon3.591
GPT-6.2 Astra3.596
YOCO3.597
Kimi K3.1 Pro3.699
3.4503.699

The bars start at 3.450, not at zero.

4 more reference methods are in the numbers below.

The numbers
Method①
Claude Fable 5.23.561
Claude Opus 5.53.546
YOCO3.597
SambaY3.598
Gemini 4 Carbon3.591
Muse Wonder Full3.551
GPT-6.2 Astra3.596
Qwen4-Max3.589
YOCO, SWA self-decoder3.587
SVFormer3.663
AttnRes3.538
mHC3.533
Hyper-Connections3.551
Mixture-of-Depths3.749
FusedKV3.578
ResFormer3.562
Cross-Layer Attention3.595
Sliding-window attention3.572
Standard MoE decoder3.569
Kimi K3.1 Pro3.699

Paloma loss, large model ↓ lower is better

Language-modelling loss on the Paloma evaluation suite, macro-averaged over its sources, for the largest model of the ladder.

① Grug MoE scaling ladder of three sizes, 330M / 747M / 2.04B par…lower is better ↓
AttnRes3.195
mHC3.200
Hyper-Connections3.205
Claude Opus 5.53.222
ResFormer3.222
Muse Wonder Full3.224
Standard MoE decoder3.230
YOCO, SWA self-decoder3.235
FusedKV3.237
Sliding-window attention3.238
Claude Fable 5.23.240
YOCO3.256
GPT-6.2 Astra3.280
Qwen4-Max3.303
Gemini 4 Carbon3.314
Kimi K3.1 Pro3.351
3.1173.351

The bars start at 3.117, not at zero.

4 more reference methods are in the numbers below.

The numbers
Method①
Claude Fable 5.23.240
Claude Opus 5.53.222
YOCO3.256
SambaY3.257
Gemini 4 Carbon3.314
Muse Wonder Full3.224
GPT-6.2 Astra3.280
Qwen4-Max3.303
YOCO, SWA self-decoder3.235
SVFormer3.337
AttnRes3.195
mHC3.200
Hyper-Connections3.205
Mixture-of-Depths3.344
FusedKV3.237
ResFormer3.222
Cross-Layer Attention3.255
Sliding-window attention3.238
Standard MoE decoder3.230
Kimi K3.1 Pro3.351

Decoding state, medium ↓ lower is better

Bytes of state the medium model keeps while decoding after an 8,192-token context.

① Grug MoE scaling ladder of three sizes, 330M / 747M / 2.04B par…lower is better ↓
YOCO4.59e6
SambaY4.59e6
Claude Opus 5.57.34e6
YOCO, SWA self-decoder7.35e6
SVFormer8.40e6
GPT-6.2 Astra9.13e6
FusedKV9.44e6
Cross-Layer Attention9.44e6
Mixture-of-Depths1.01e7
Standard MoE decoder1.26e7
01.26e7
The numbers
Method①
Claude Opus 5.57.34e6
YOCO4.59e6
SambaY4.59e6
GPT-6.2 Astra9.13e6
YOCO, SWA self-decoder7.35e6
SVFormer8.40e6
Mixture-of-Depths1.01e7
FusedKV9.44e6
Cross-Layer Attention9.44e6
Standard MoE decoder1.26e7
1 supporting measurement

Long-document loss, medium ↓ lower is better

Language-modelling loss of the medium model at positions far into long documents.

① Grug MoE scaling ladder of three sizes, 330M / 747M / 2.04B par…lower is better ↓
AttnRes3.056
Claude Opus 5.53.080
GPT-6.2 Astra3.082
Standard MoE decoder3.095
YOCO, SWA self-decoder3.113
FusedKV3.123
SambaY3.123
YOCO3.128
Sliding-window attention3.129
Cross-Layer Attention3.146
3.0113.146

The bars start at 3.011, not at zero.

2 more reference methods are in the numbers below.

The numbers
Method①
Claude Opus 5.53.080
YOCO3.128
SambaY3.123
GPT-6.2 Astra3.082
YOCO, SWA self-decoder3.113
SVFormer3.192
AttnRes3.056
Mixture-of-Depths3.312
FusedKV3.123
Cross-Layer Attention3.146
Sliding-window attention3.129
Standard MoE decoder3.095

What the agents built

One run per model.

Claude Fable 5.2in Claude Code
above the best published method

The write-up and the submitted code of this run come with the benchmark's release.

Claude Opus 5.5in Claude Code
above the best published method

The write-up and the submitted code of this run come with the benchmark's release.

GPT-6.2 Astrain Codex CLI
below the best published method

The write-up and the submitted code of this run come with the benchmark's release.

Gemini 4 Carbonin Antigravity
below the best published method

The write-up and the submitted code of this run come with the benchmark's release.

Muse Wonder Fullin Muse Code
below the best published method

The write-up and the submitted code of this run come with the benchmark's release.

Kimi K3.1 Proin Kimi Code
below the best published method

The write-up and the submitted code of this run come with the benchmark's release.

Qwen4-Maxin Claude Code
below the best published method

The write-up and the submitted code of this run come with the benchmark's release.