full attention
Some of the model's layers keep an archive: a card for every token read so far, filed in order and never changed. Each new token looks back over all the cards and takes what it needs from them, however far back they are. It is called attention because each token focuses on the few cards that matter most, and full attention because every card stays in view.
A kind of layer in which each token looks back directly at every token before it. The layer keeps a record for every token - what was on that token's residual stream when it reached this layer - and each new token compares itself with all of them and draws on the ones that matter to it. Nothing in the record is ever changed, so a detail from far back is as exact as one from the last word. In most language models every layer works this way; in Qwen3.5-4B, 8 of the 32 layers do.
Each position forms a query (what it looks for), compares it with a key from every earlier position (what that card is about), and takes a weighted mix of those positions' values (the cards' notes). The weights are the attention pattern, and a position may attend only to itself and to what came before it. The keys and values of past positions are kept so that they are computed only once. Recall is exact at any distance, at a cost per token that grows with the number of tokens already read, so the total cost grows with the square of the length. This is the attention that the transformer is built on (Vaswani et al., 2017), which uses it in every layer. Qwen3.5-4B uses it in 8 of its 32 layers, the last of every group of four, and linear attention in the rest.
Scaled dot-product self-attention under a causal mask, per head (Vaswani et al., 2017, Attention Is All You Need). Qwen3.5-4B's config makes layers 4, 8, …, 32 full attention (full_attention_interval 4), 8 of the 32, each with 16 query heads sharing 4 key-value heads of 256 (grouped-query attention) and rotary position encoding on a quarter of each head. The keys and values of past positions are the KV cache. In the other 24 layers a linear-attention state stands in their place.
The archive's cost is its size. Every token adds a card, and every new token has to look back through all of them.
The cost is that the record grows. Each token adds 16,384 numbers to Qwen3.5-4B's 8 archives. After 768 tokens - about a page of text - they hold more numbers than all the model's whiteboards together, and at the model's limit of 262,144 tokens they would hold about 4.3 billion, more numbers than the model's own weights. And every new token has to look back through more cards than the one before, so each token takes more work. That is why Qwen keeps an archive on only one layer in four.
Where the archive picture breaks. A card is really two halves - what the token is about (its key) and its note (its value) - and each half is split into 4 parts, one per head. Reading is split too: a new token looks back 16 ways at once, four of them sharing each part of the cards, and each way can focus on different cards. The growth is as pictured: 16,384 numbers a token across the 8 layers, which passes the fixed memory of the 24 linear-attention layers at 768 tokens and reaches about 4.3 billion numbers at the 262,144-token context window.
Read off the model's cache by lesson 4's probe: each full-attention layer keeps a key and a value for each of 4 heads of 256, 2 × 4 × 256 = 2,048 numbers a token (the card lesson 4 counts), read by 16 query heads, four to each key-value head. That is 16,384 a token over the 8 layers, against 12,582,912 numbers of recurrent state in the 24 linear-attention layers, fixed; the two are equal at 768 tokens. At 262,144 tokens the keys and values come to 4,294,967,296 numbers (about 4.3 billion), against the language model's 4,205,751,296 weights; with full attention in all 32 layers it would be four times that.
Wang et al. (2025, A Systematic Analysis of Hybrid Linear Attention) find that in a hybrid the ratio of linear to full layers mainly controls recall, with language modelling nearly unchanged, and recommend 3 to 1 up to 6 to 1. In Raindrop's split-prefill runs on Qwen3.5-4B (the method of Afendulev et al., 2026), a planted tag was recalled from the keys and values alone in 30 of 30 cases, and followed them in 30 of 30 when the recurrent states came from a different context.