How much of a decoder's attention is actually load-bearing
A 40-layer decoder keeps its quality, its benchmark capability and its long-context
retrieval with 57.5% of its attention layers replaced by token-local
blocks — and gives back the same share of key/value cache and roughly double the
prefill throughput. The attention that cannot be removed is at the front of the network.
−57.5%
key/value cache
34 KB/token vs 80
1.99×
prefill throughput
measured at 4K
+49%
cached decode
measured at 4K
57.5%
of attention removed
at better quality than baseline
41 training runs across 25 layer plans, each a 152-million-parameter, 40-layer decoder
trained on two billion FineWeb-Edu tokens at 4K context. Every plan has an identical
parameter count, so only the attention map differs. Headline comparisons are repeated
at three seeds and reported against the resulting spread.
Serving economics
An attention layer costs memory and compute twice over at long context: it holds a key/value cache that grows linearly with the context, and its share of prefill grows with the square of it. A token-local block holds no cache and grows linearly. Removing 57.5% of the attention layers therefore removes 57.5% of the cache exactly — not approximately, and not less as context grows.
Cache figures are read from the live cache during generation, not estimated. Throughput is measured on a controlled benchmark at the trained 4K window; the prefill advantage widens as context grows.
Quality across the replacement range
Each point is a separately trained 40-layer model, identical in parameter count and token budget, differing only in which layers keep attention. The headline configurations were each trained at three seeds so the differences can be read against run-to-run variation rather than assumed.
The shaded band is the baseline's own seed spread. Replacing 57.5% of attention lands below it; 65–70% costs a small, repeatable amount; 80% leaves the range entirely. Moving the same attention budget to the end of the network is worse than any of them.
Benchmark capability
Validation loss alone can hide a capability that has quietly gone missing, so the same checkpoints were scored on the standard LM Evaluation Harness — LAMBADA, which requires resolving a dependency across a whole passage, and WikiText perplexity.
Capability tracks the baseline all the way to 70% replacement, including at the point where validation loss has begun to slip. Both measures fall together only when the model is genuinely broken.
Long-context retrieval
The reason to remove attention is long-context serving cost, so the configurations were also asked to retrieve a fact buried at varying depths in a haystack — the capability most obviously at risk when attention layers are taken away.
Short contexts are saturated and separate little. At the longest tested length the recommended configuration retrieves more reliably than the all-attention baseline, while the configurations that failed elsewhere fail here too.
Where the remaining attention has to sit
Two findings, one useful and one cautionary, came out of holding the attention budget
fixed and moving it around.
Attention is front-critical
Taking the same small budget of attention layers and moving it from the front of the
network to the end produced the worst model in the study, by a wide margin. The early
layers build a representation the rest of the network refines; adding attention back
near the output recovers next-word prediction but never general quality.
Beyond that, placement is forgiving
Within the region that can be replaced, several spacing schemes we expected to matter
did not separate from even spacing once each was run at three seeds. Keeping a solid
block of early attention matters; the schedule of what follows it, at this scale,
does not.
What this does not establish
These are controlled results at 152 million parameters and a 4K trained context. They do
not establish equivalence at substantially larger scale, and the 128,000-token cache
figures are exact arithmetic on a quantity that scales linearly — not a measurement
of quality at that length.
Run-to-run variation at this scale turned out to be larger than most of the differences
we were originally chasing. Two effects that looked real at a single seed did not survive
replication, and are reported as the null results they are. Where a comparison sits near
the significance threshold we say so rather than rounding it into a claim.
The token-local block at the center of the study belongs to a known family of gated
units. The contribution here is the controlled map — how much attention can go, from
where, and what it is worth — not the algebra.
Everything behind these charts
Every number on this page is backed by a raw record. The release ships the implementation,
the generated configuration for all 25 layer plans, and an evidence archive covering all 41
runs — resolved configs, metric streams, environment metadata, data hashes, retrieval
results and the benchmark records behind the cost figures — along with the analysis
tooling that produced the reported verdicts. Apache-2.0 licensed.