protologue

Attention Sinks

Also called attention sink, StreamingLLM, sink tokens.

Attention sinks are the first few tokens of a sequence, which transformer language models attend to strongly regardless of their content; keeping their cached keys and values lets a model generate stably over streams longer than its attention window.

Description

Xiao et al. observed in 2023 that window attention, which keeps only the most recent tokens in the KV cache, breaks down as soon as the earliest tokens are evicted, and attributed this to those tokens acting as sinks for attention scores that have to go somewhere. Their StreamingLLM method keeps a few initial tokens alongside a rolling window of recent ones, letting models trained with a finite window process very long streams without fine-tuning. They also suggested adding a dedicated sink token during pre-training. Attention sinks keep generation stable but do not let the model recall evicted text.

Sources

  1. Xiao et al. (2023). Efficient Streaming Language Models with Attention Sinks.

Cite this entry

Protologue. (2026). Attention Sinks. In Protologue: A Taxonomy of Prompting and LLM Techniques (v1.9.1, PTL-0262). https://protologue.com/t/attention-sinks/

BibTeX
@misc{protologue_attention_sinks,
  title = {Attention Sinks},
  author = {{Protologue}},
  year = {2026},
  howpublished = {Protologue: A Taxonomy of Prompting and LLM Techniques, v1.9.1},
  note = {Entry PTL-0262},
  url = {https://protologue.com/t/attention-sinks/}
}

Markdown JSON