[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"glossary-sliding-window-attention::en":3,"gloss-cluster-sliding-window-attention::en":26,"gloss-next-sliding-window-attention::en":9},{"slug":4,"category":5,"name":6,"definition":7,"meta_desc":8,"faq":9,"schema_markup":9,"related":10},"sliding-window-attention","core-ai","Sliding Window Attention","Sliding window attention restricts each token to attending over a fixed-size neighbourhood of recent tokens rather than the whole sequence. Standard attention compares every token with every other, so cost and memory grow with the square of sequence length — the reason long contexts are expensive to serve. A window of, say, a few thousand tokens turns that into linear growth, because the work per token stops depending on how long the document is. Information still travels further than one window: with each layer attending inside its own window, a token can be influenced by material several windows away, in the way a stack of small convolutions covers a wide receptive field. Many long-context models therefore interleave windowed layers with a few full-attention layers, so most of the sequence is processed cheaply while some layers retain a global view. The trade-off is worth stating plainly for anyone building on top. Windowing reduces the cost of long inputs but weakens exact recall of a detail sitting far outside the current window, which is precisely the pattern that makes a model look unreliable on \"find the one clause in this contract\" tasks. If your workload depends on pinpoint retrieval from a large document, a retrieval step that puts the relevant passage near the question is more dependable than trusting any attention scheme to reach across the whole input.","Sliding window attention limits each token to a nearby span, turning quadratic cost linear — and weakening exact recall of details far outside the window.",null,[11,14,17,20,23],{"slug":12,"name":13},"attention","Attention",{"slug":15,"name":16},"context-window","Context Window",{"slug":18,"name":19},"flash-attention","FlashAttention",{"slug":21,"name":22},"kv-cache","KV Cache",{"slug":24,"name":25},"transformer","Transformer",[27,31,35,39,40,43,46,49,52,55,56,59],{"slug":28,"category":5,"name":29,"updated_at":30},"agentic","Agentic AI","2026-08-24T02:46:36+00:00",{"slug":32,"category":5,"name":33,"updated_at":34},"alignment-tax","Alignment Tax","2026-08-24T02:46:37+00:00",{"slug":36,"category":5,"name":37,"updated_at":38},"artificial-intelligence","Artificial Intelligence (AI)","2026-08-24T02:46:38+00:00",{"slug":12,"category":5,"name":13,"updated_at":30},{"slug":41,"category":5,"name":42,"updated_at":38},"beam-search","Beam Search",{"slug":44,"category":5,"name":45,"updated_at":34},"benchmark-contamination","Benchmark Contamination",{"slug":47,"category":5,"name":48,"updated_at":34},"catastrophic-forgetting","Catastrophic Forgetting",{"slug":50,"category":5,"name":51,"updated_at":38},"computer-vision","Computer Vision",{"slug":53,"category":5,"name":54,"updated_at":34},"constitutional-ai","Constitutional AI",{"slug":15,"category":5,"name":16,"updated_at":30},{"slug":57,"category":5,"name":58,"updated_at":38},"deep-learning","Deep Learning",{"slug":60,"category":5,"name":61,"updated_at":30},"diffusion-model","Diffusion Model"]