KIMI K3

Depth, Rewired

chapter 3 of 6 · about 5 minutes

A layer is one stage of a model's computation. It reads the representation passed from the stage below, changes it, and hands a new representation upward. More layers give a model more chances to transform a difficult signal, but they also create distance. Kimi K3 has 93 layers. If layer 12 finds a useful feature, layer 40 normally receives it only after it has passed through every layer in between. A residual connection helps by adding an earlier representation back into the current path. That creates a short route for information and gradients, which makes deep stacks easier to train. It still has one limitation: the current layer receives a blended result. It cannot directly ask whether the representation from layer 12, layer 24, or layer 38 is the most useful source for this stage of processing. Features can also change role as depth grows. An early layer may encode a local pattern, a middle layer may combine it with context, and a later layer may need one of those versions rather than the final blend alone. K3's answer isAttention Residuals (AttnRes), a depth-wise lookup mechanism that lets a later layer choose from earlier representations instead of receiving only their accumulated result.

Why give depth more than one skip lane?

Attention is a weighted lookup. A query expresses what information is needed, keys describe the available candidates, and values are the information returned. Sequence attention uses this process across token positions. AttnRes applies the same idea across model depth. Each receiving layer owns a learned pseudo-query. It is pseudo because it is a model parameter rather than a vector calculated from the current token. The pseudo-query scores the token embedding and earlier outputs, then gives more weight to the representations that fit its learned preference. Root mean square normalization (RMSNorm) puts those candidates on a comparable scale before the scores are made, so a layer with unusually large values does not win merely because of its magnitude. The plain-language effect is a direct retrieval lane through depth. A late layer can use a lower-layer feature without hoping that feature survived unchanged through the whole stack. The full version of this idea would keep every earlier layer output available. That is affordable in arithmetic for fewer than 100 layers, but keeping every output alive costs memory and communication. K3 therefore uses Block AttnRes. The config sets attn_res_block_size: 12: layers inside a block contribute to one running block representation, and later blocks attend to those summaries. The paper describes eight 12-layer blocks, with a partial final block and the embedding as an additional source. This changes the stored history from every layer to a smaller set of block summaries, which bounds the extra state while preserving a choice among earlier depth regions. Drag the slider to change how strongly layer 40 borrows from layer 12, then watch the skip lane widen. It shows the central tradeoff: wider access to earlier work costs more state, so the model groups that work before it passes it forward.

Mix an earlier attention layer

Drag the slider to set how much layer 40 reads from layer 12.

layer 40 reads from layer 12:65%
L12L40the skip lane carries attention outputs to a deeper layerboxes show layers in sequence; the lane runs directly from L12 to L40
In a standard stack, layer 40 receives what layer 12 learned only through the intervening layers. As a network gets deeper, gradients and information can weaken across those hops. Attention Residuals (K3 report §2.2) give deep layers a direct path to earlier attention outputs. Qwen's 4-lane Gated Residual and DeepSeek's mHC address the same problem in different ways.
The names are close because the problem is close, not because the mechanisms are identical.Kimi's Attention Residuals use learned attention over earlier representations. That gives each receiving layer a learned weighting over depth. Qwen's Gated Residual uses a 4-branch stream and a gate, which decides how much information to pass along each branch.DeepSeek/GLM's manifold-constrained hyper-connections (mHC) use another mathematical route for widening the connection pattern. None of these names says that a layer has access to every past detail for free. The useful comparison is the tradeoff each makes between wider access to earlier features and the memory, communication, and computation needed to keep those features available. AttnRes's block summaries are Kimi K3's answer to that accounting problem.
receipts, every claim in this chapter, checked 2026-08-31