Which token most often serves as an attention sink in pretrained autoregressive LLMs?
The very first token (typically BOS). It is present in every sequence at a predictable index and content-light, the ideal place to dump softmax's mandatory no-op mass.
Picture a classroom where every student is forced to raise a hand on every question, even when they do not know the answer. To keep things tidy, the class agrees that the kid in the front row is the official 'I do not know' designate, so anyone who is unsure points at them. Over the course of the year that front-row kid ends up with most of the don't-know votes, even on questions other kids actually want to answer. Transformer attention heads do the same thing with the first token of every sequence: it becomes the official 'I have nothing better to say' target.
Detailed answer & concept explanation~6 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
Name BOS as the canonical sink, derive why position 0 is the unique convergent dump target, link to StreamingLLM's sliding-window fix, and connect to the outlier-activation quantization problem.
Real products, models, and research that use this idea.
- Xiao et al. 2023 (StreamingLLM): characterized the sink phenomenon and showed that keeping the first 4 tokens in the KV cache enables million-token-scale streaming generation on Llama-2 7B.
- Llama 4 Maverick, GPT-5.5, Claude Opus 4.7, Gemini 3.1 Pro, DeepSeek V4: all exhibit classical BOS sinks; their production serving stacks include StreamingLLM-style sink retention.
- Dettmers et al. 2022 (LLM.int8): identified the outlier-activation problem at sink-bearing positions, motivating mixed-precision quantization schemes.
- Darcet et al. 2024 (Vision Transformers Need Registers): showed the same sink phenomenon in ViT and demonstrated that register tokens eliminate it.
- Mistral 7B and Mixtral exhibit BOS sinks; sliding-window attention serving requires sink retention to avoid degraded long-context behavior.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhy does dropping BOS from a sliding-window KV cache cause long-context generation to collapse rather than degrade gracefully?
QHow does the attention-sink phenomenon connect to the difficulty of quantizing LLMs to int8 or int4?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Picking 'most recent token' because recency biases attention. Recent tokens do receive a lot of attention, but not the sink-style no-op dump that defines attention sinks.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.