Norms & blocks

Attention residuals (AttnRes)

Blocks don’t just add onto one residual stream. They attend back over earlier depths and pull in a weighted mix of what is useful.

First page of DenseFormer: Enhancing Information Flow in Transformers via Depth Weighted AveragingGoes back toFeb 2024DenseFormer: Enhancing Information Flow in Transformers via Depth Weighted AveragingPagliardini et al. · arXiv 2402.02622 ↗
Earlier layer states are selectively retrieved and mixed for the current blockEarlier layer statesthe current block can retrieve from any depthselect → mix → useembeddingblock n−3block n−2block n−1αcurrentblock nlearned α weights make the residual stream selective—not uniform

A plain residual connection adds each block’s output onto a single running stream, so depth-to-depth information has to travel through that one shared channel. Attention residuals generalize the idea: a set of learned α operators lets a block look back across all of the earlier depths at once and retrieve a weighted combination of their representations. It is attention over depth, the way ordinary attention is over sequence. Moonshot’s Kimi K3 is the first open model to announce it at scale (the α operators in its diagram). The mechanism has roots in DenseFormer’s depth-weighted averaging of past layers, with the newer twist that the mixing weights are computed from the input rather than fixed after training.

No traced model uses this yet. Kimi K3 (due July 27) will be the first: read our interactive K3 preview. We trace the real graph the moment the weights land, and it will appear below.

Related concepts

hfviewer renders the full architecture of 2,300+ Hugging Face models as interactive graphs. Hover any block to see what it does, with this model’s real numbers.

Browse all model graphs →