TriGLU v0.3.0 · results

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.

KV cache at 128K contextBar chart: the all-attention baseline holds 10 GB of key/value cache at a 128,000-token context, the recommended 57.5%-replaced configuration holds 4.25 GB, and the 70%-replaced configuration holds 3.00 GB.Key/value cache held at a 128,000-token context40a0t80 KB/token10.00 GBall 40 attention layersp12_c434 KB/token4.25 GB −57.5%recommended · 57.5% replacedp6_c424 KB/token3.00 GB −70.0%aggressive · 70% replaced
Throughput relative to baselineBar chart: relative to the all-attention baseline, the recommended configuration reaches 1.99 times prefill throughput and 1.49 times cached decode; the aggressive configuration reaches 2.21 and 1.68 times.Serving throughput, measured at the 4K trained windowrelative to the all-attention baselinePrefill40a0t1.00× 21,100 tok/sp12_c41.99× 41,888 tok/sp6_c42.21× 46,679 tok/sCached decode40a0t1.00× 114.3 tok/sp12_c41.49× 170.6 tok/sp6_c41.68× 192.4 tok/s
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.

Validation loss versus replacement shareScatter chart with seed error bars: the 57.5%-replaced configuration sits below the all-attention baseline band; 65 and 70 percent sit slightly above it; 80 percent is far worse, and moving the same attention budget to the end of the network is worse still.Validation loss against how much attention was replacedlower is better · bars show seed spread over three runs3.153.183.213.240%20%40%60%80%share of attention layers replaced40a0t 3.1638 · all attentionp12_c4 3.1536 · recommendedp8_c4 3.1742p6_c4 3.1785p8_front_only 3.2481p0_post8 3.338 (off scale)
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.

Benchmark capabilityBar charts: LAMBADA accuracy and WikiText perplexity are held at baseline level up to 70 percent replacement, and degrade clearly at 80 percent.Benchmark capability, standard LM Evaluation HarnessLAMBADA accuracyhigher is better40a0t0.200p12_c40.211p8_c40.202p6_c40.210p8_front_only0.141WikiText perplexitylower is better40a0t50.0p12_c450.1p8_c451.2p6_c450.5p8_front_only56.7
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.

Needle-in-a-haystack retrievalHeatmap: retrieval accuracy by haystack length. The recommended configuration retrieves better than the all-attention baseline at the longest tested length; the broken configurations retrieve worst.Long-context retrieval · needle-in-a-haystack accuracyshare of buried facts retrieved, by haystack length5121K2K3.8Kp12_c41.001.000.930.6140a0t1.001.000.880.55p8_c41.000.990.810.50p6_c40.960.940.700.45p8_front_only1.001.000.700.43p0_post81.000.960.680.43
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.