Attention Sinks › Empirical Validation
Language AI HandbookAll chapters Attention Sinks › Empirical ValidationOne section · Sections in this chapter10 / 16 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
The mathematical argument for StreamingLLM explains why the method works, but empirical confirmation is equally important. Two questions matter most in practice: how many sink tokens do you need, and how large does the window need to be? The answers determine the memory footprint of your deployment. The original paper's findings on these questions have been replicated across many model families.
The key metric for evaluating streaming generation quality is perplexity: the model's average uncertainty per token, measured on a held-out evaluation set. Lower perplexity means the model assigns higher probability to the correct next token, indicating better prediction quality. When we vary the number of sink tokens or the window size and measure how perplexity changes, we get a direct empirical measurement of how much each parameter affects generation quality.
Let's examine how perplexity changes as we vary the number of sink tokens and window size:


The left plot confirms that preserving 4 sink tokens is sufficient for most models. Additional sinks provide diminishing returns. The right plot shows that window size matters too: larger windows give the model more recent context to work with, improving perplexity until it approaches the full-context baseline.