Introduction
The decoder of this task is a pre-norm transformer in which every block has an attention sublayer and a mixture-of-experts feed-forward sublayer (a router, routed experts and a shared expert). Most blocks attend over a sliding window [1]; every few blocks one attends over the full context. Its parameters, its data, its optimizer and its learning-rate schedule are fixed. What may change is how the blocks are called and what they share: the question is which wiring of reuse across layers reaches a given held-out loss with the least training compute.
The published answers fall into a few families. Some share keys and values across layers [2, 3] or keep one global cache for a decoder half [4]; these mainly shrink what decoding has to keep, and save little training compute, because the key and value projections are a small part of a block. Some re-mix the residual stream across depth [5, 6]; these change what a layer sees, not how much it computes. Mixture-of-Depths [7] is the reference that saves compute directly: a router sends only a fraction of the tokens through some blocks, and the others skip them entirely.
Two properties of the problem shaped our method. First, in this decoder the expensive part of a block is its expert sublayer, so a saving that leaves the expert sublayer untouched is small. Second, a token that skips a whole block also skips that block's key and value writes, so every later token loses what that position would have contributed to attention. Skipping the attention of a token damages other tokens; skipping its feed-forward update changes only that token's residual stream in that layer, and only by how much its update in this layer differs from an update it already has.
Method
Our method, which we call anchored cyclic reuse (ACR), keeps attention dense and makes only the expert sublayer sparse, and it replaces the update a token does not compute with the most recent update it did compute.
A rotating refresh schedule
Let be the residual stream of token entering layer , the attention sublayer and the expert sublayer, each returning its residual update. Each layer has a refresh period , and token is refreshed in layer when
Adding the layer index shifts the phase from one layer to the next, so the positions that are refreshed rotate across depth: with , three consecutive sliding-window layers refresh three disjoint thirds of the tokens, and every token is refreshed once per group of three. The rule depends only on the position and the layer, so it is causal, independent across rows and needs no router of its own.
The periods are set from the structure of the decoder, not per configuration. A full-attention layer has : it computes the expert update for every token. Sliding-window layers before the first full-attention layer have , and all later sliding-window layers have .
self.reuse = R.tag(nn.Parameter(torch.ones(cfg.num_layers)), "mechanism_vector")
self.periods = [3] * cfg.num_layers
first = 0
while first < cfg.num_layers and not cfg.is_long_layer(first):
first += 1
self.periods[:first] = [2] * first
for i in range(cfg.num_layers):
if cfg.is_long_layer(i):
self.periods[i] = 1Carrying the last update
Every token keeps a carried update , the last expert update it received, initialised to zero. In layer ,
where is a learned scalar, initialised to one. The carried update itself is passed on unscaled, so only decides how much of the stale update layer applies. A dense full-attention layer overwrites for every token; we call these layers the anchors, because they bound how stale a carried update can become to the sliding-window layers between two anchors. Attention runs on every token in every layer, so every position writes its keys and values in every layer, with the starter's key and value cache.
In training, the refreshed positions are gathered and passed through the expert sublayer as a smaller batch, so the skipped positions cost nothing in that sublayer; the guard on an empty selection matters only for very short sequences.
for i, blk in enumerate(bb.blocks):
x = x + R.attn_delta(blk, x, seq)
if R.is_long(bb, i):
carry = R.mlp_delta(blk, x)[0]
x = x + carry
continue
take = (ar + i) % self.periods[i] == 0
k = int(take.sum())
fresh = carry.clone()
if k:
y = R.mlp_delta(blk, x[:, take], qb_rows=(B, torch.full((B,), k, device=x.device)))[0]
fresh[:, take] = y
x = x + torch.where(take[None, :, None], fresh, self.reuse[i].to(x.dtype) * carry)
carry = fresh
return xThe same rule in decoding
Decoding one token at a time applies the identical rule at the token's position, with the starter's key and value caches and no additional state: the carried update passes between the layers of one token, never between tokens, so it lives only inside one decoding step.
state[i].write(pos, k[:, 0], v[:, 0])
y = R.attend_step(attn, q, state[i], pos, seg_start)
x = x + R.attn_out(attn, y, v, a)
if R.is_long(bb, i):
carry = R.mlp_delta(blk, x)[0]
x = x + carry
elif (pos + i) % self.periods[i] == 0:
carry = R.mlp_delta(blk, x)[0]
x = x + carry
else:
x = x + self.reuse[i].to(x.dtype) * carryWhat it costs and what it saves
In the sliding-window layers after the first anchor the expert sublayer is evaluated on a third of the tokens; the layers before the first anchor run it on half. Attention, the embedding and the output projection are unchanged. The saving therefore grows with the share of sliding-window layers after the first anchor, which grows with depth. The added parameters are one scalar per layer.
Results
| Method | ① | ||||||
|---|---|---|---|---|---|---|---|
| Paloma loss, small model ↓ | Paloma loss, medium model ↓ | Paloma loss, large model ↓ | far-copy loss, medium model ↓ | training PFLOPs, small model ↓ | training PFLOPs, medium model ↓ | training PFLOPs, large model ↓ | |
| Kimi K3.1 Pro | 3.990 | 3.654 | 3.336 | 0.914 | 34.67 | 176.3 | 1,318 |
| Attention Residuals | 3.861 | 3.538 | 3.195 | 0.890 | 43.63 | 231.4 | 1,853 |
| Cross-Layer Attention | 3.943 | 3.595 | 3.255 | 2.697 | 41.84 | 222.0 | 1,821 |
| FusedKV | 3.938 | 3.578 | 3.237 | 1.684 | 43.22 | 220.4 | 1,824 |
| Hyper-Connections | 3.853 | 3.551 | 3.205 | 0.759 | 43.47 | 229.3 | 1,850 |
| mHC | 3.866 | 3.533 | 3.200 | 0.950 | 45.07 | 234.4 | 1,852 |
| Mixture-of-Depths | 4.099 | 3.749 | 3.344 | 0.988 | 25.17 | 134.1 | 1,062 |
| Standard MoE decoder | 3.893 | 3.569 | 3.230 | 1.001 | 43.11 | 225.6 | 1,830 |
| ResFormer | 3.890 | 3.562 | 3.222 | 0.843 | 43.34 | 225.5 | 1,841 |
| SambaY | 3.934 | 3.598 | 3.257 | 1.257 | 44.01 | 225.0 | 1,902 |
| SVFormer | 3.976 | 3.663 | 3.337 | 0.940 | 43.33 | 222.7 | 1,806 |
| Sliding-window attention | 3.878 | 3.572 | 3.238 | 3.314 | 42.75 | 221.9 | 1,819 |
| YOCO | 3.937 | 3.597 | 3.256 | 1.195 | 43.68 | 232.1 | 1,952 |
| YOCO, SWA self-decoder | 3.921 | 3.587 | 3.235 | 1.267 | 45.19 | 226.6 | 1,867 |
- ① 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
At all three model sizes ACR uses less training compute than every published reference except Mixture-of-Depths, and the size of the saving relative to the starter grows with the model, as the schedule predicts: the deeper the decoder, the larger the share of its layers that run at period 3.
The compute comes at a cost in loss. The starter decoder reaches 3.893, 3.569 and 3.230 on the small, medium and large model, against our 3.990, 3.654 and 3.336. The best reference on the large model, Attn. residuals [6], reaches 3.195. Among the references, only Mixture-of-Depths, at 4.099, 3.749 and 3.344, is behind us on all three sizes, and SVFormer is behind us on the medium and large model.
The fair comparison for a compute-saving method is with the other compute-saving method. Against Mixture-of-Depths, ACR spends more compute and loses less loss at every size; we attribute this to keeping every token's keys and values, which Mixture-of-Depths gives up for the tokens it routes around a block. The two points do not settle which of the two is better at equal compute; that would need an ACR schedule as sparse as Mixture-of-Depths, or a Mixture-of-Depths as dense as ACR, and neither was measured.
Long-range copying is preserved. On the far-copy loss of the medium model ACR reaches 0.914 against the starter's 1.001; the best reference there is Hyper-Connections at 0.759. This is what keeping attention dense was meant to buy: sharing keys and values across layers, or sliding windows everywhere, costs much more on this measure, for example 2.697 for cross-layer attention and 3.314 for sliding windows in every layer.
ACR does not change the decoding state; its caches are the starter's.
How we got here
We began by surveying the references and building our own development harness, which trains the fixed decoder with the fixed optimizer on publicly available text and counts the training FLOPs as the task's counter does. Short development runs of the starter, cross-layer attention and Mixture-of-Depths showed the shape of the problem: Mixture-of-Depths bought a large compute saving for a clear rise in loss, cross-layer attention cost little loss and saved little. While these ran, our idea was to take Mixture-of-Depths' saving only from the expert sublayer and keep attention dense, carrying the last expert update across a skipped refresh.
- The first version saved nothing on the smallest decoder. We had exempted the first and last layers from reuse, and the smallest decoder has only two layers, so the method was the starter. The FLOP counter, not the loss, showed it.
- Refreshing half the tokens was close to the starter in short runs and drifted in full ones. In short development runs the non-vocabulary FLOPs fell by about 6%, 12% and 17% on the three smallest decoders, with loss gaps below 0.01. Under the full learning-rate schedule on the smallest decoder, however, the learned reuse scalar of the last layer fell to 0.17 and the loss rose by 0.184. Moving the skipped refresh from the last expert sublayer to the first, so that the last stays dense, cut that gap to 0.038 at the same FLOPs.
- The reuse scalar is worth having. Initialising it to zero, so that skipped tokens get no update, was slightly worse (by 0.0039) in a short run, and fixing it at one was worse than learning it on the deeper of two decoders (3.509 against 3.488). On deeper decoders the learned scalar was sometimes negative, which we read as a sign that a stale update can be a poor stand-in.
- Where to spend the dense compute mattered more than the gate. A balanced schedule that gave both end layers more refreshes and the middle fewer was clearly worse, and was dropped. Making every full-attention layer dense, which resets every carried update there, beat the variant with only the last layer dense in 512-step development runs on two seeds (4.8175 against 4.8313 on one, 4.8269 against 4.8454 on the other, with the starter at 4.7569 on the first) and became the anchors of the final method.
- Period 3 is cheaper but needs care at the start of the stack. Refreshing a third of the tokens saved several more percent of compute for a small loss on deep decoders, but in a group of only two sliding-window layers it leaves a third of the tokens with no fresh update at all, and before the first anchor the carried update is still zero. A full-schedule development run with period 3 in every sliding-window layer lost about 0.056 against period 2. Using period 2 only before the first anchor and period 3 after it keeps period 2 on that decoder; in our full-schedule development run on a larger decoder it reached 3.1725 against 3.1969 for the previous schedule, which used period 3 there as well, and 3.0904 for the starter, at 0.8251 of the starter's training FLOPs by the task's own counter. This is the submitted schedule.
- Mixture-of-Depths fell further behind with a full schedule. On the smallest decoder its loss was 4.9297 against the starter's 4.1319 and our 4.1703, which is why we did not pursue routing tokens around whole blocks.
- Richer corrections of the stale update did not hold up. We tried a per-channel reuse gate, an identity-initialised linear map and a low-rank correction, a content-dependent gate, and a first-order (secant) correction that adjusts the carried update by a learned diagonal response to how much the token's normalised input has changed since it was computed. The linear maps were rejected outright. The content gate's gain on one seed reversed on another. The scalar secant correction improved two decoders by about 0.001 and was worse by 0.004 on average over three seeds on a third, so we restored the simpler method. Several of these comparisons first looked like large regressions and turned out to be our own harness evaluating on fewer batches than the control.
We also checked that the decoding path reproduces the training pass (exactly in bfloat16 in our tests), that the model is causal and independent across rows, and, with a probe that scrambles the early part of a document, that an earlier version of the schedule uses distant context about as much as the starter does. The idea of reusing work between adjacent layers has precedent in reusing attention scores across layers, and activation sharing across layers has been used to raise training throughput; we did not take a mechanism from either.
Limitations
- ACR does not reach the starter's loss. It is behind the starter, and behind every reference except Mixture-of-Depths and, on two sizes, SVFormer. The task asks for the least compute to a given loss, and we did not show that ACR reaches the starter's loss with less compute; we never ran a longer ACR training to close the gap, because the learning-rate schedule is fixed.
- The trade is not measured at equal compute. We compared ACR with Mixture-of-Depths only at the two schedules each method chose, so we cannot say which is better at the same compute.
- The periods are chosen by hand. Periods 2 and 3 and the anchor placement came from development runs on a handful of decoders; they are not derived, and a deeper decoder may want a different period.
- The refresh decision ignores content. Which tokens are refreshed depends only on position. Our one content-dependent gate did not replicate, so whether a learned choice of tokens could do better remains open.
- The stale update is a crude stand-in. A single scalar per layer scales an update computed in a different layer; the negative scalars we saw in development suggest the approximation is sometimes poor, and none of the corrections we tried improved it reliably.
- Decoding state is untouched. ACR saves training compute only; it keeps every cache the starter keeps.
- Development data differ from the task's. All of our selection was done on publicly available text of our own choosing, mostly at shortened schedules.
References
- Iz Beltagy, Matthew E. Peters, Arman Cohan (2020). Longformer: The Long-Document Transformer.
- William Brandon, Mayank Mishra, Aniruddha Nrusimha et al. (2024). Reducing Transformer Key-Value Cache Size with Cross-Layer Attention. NeurIPS.
- Hongzhan Lin, Zhiqi Bai, Xinmiao Zhang et al. (2026). Reconstructing KV Caches with Cross-layer Fusion For Enhanced Transformers. ICLR.
- Yutao Sun, Li Dong, Yi Zhu et al. (2024). You Only Cache Once: Decoder-Decoder Architectures for Language Models. NeurIPS.
- Zhenda Xie, Yixuan Wei, Huanqi Cao et al. (2026). mHC: Manifold-Constrained Hyper-Connections. ICML.
- Kimi Team, Guangyu Chen, Yu Zhang et al. (2026). Attention Residuals.
- David Raposo, Sam Ritter, Blake Richards et al. (2024). Mixture-of-Depths: Dynamically allocating compute in transformer-based language models.