[KongchangAI]
ConceptSliding Window Attention / 局部注意力

Sliding Window Attention

A mechanism that restricts attention computation so that each token attends only to a fixed-size window of preceding tokens rather than the full sequence. This reduces attention complexity below O(n²) and is commonly used for memory optimization in long-context language models.

Timeline (last 90 days)

Oct 14

The implementation of unlimited context typically relies on retrieval-augmented generation (RAG) or variants of the sliding window attention mechanism.

Unverified50%
Oct 14

Sliding window attention is a local attention variant in the Transformer architecture, where each token only attends to tokens within a fixed-length window before and after it, reducing the attention computation complexity from O(n²) to O(n·w).

Unverified50%
Sep 27

Spark X 2.5 has 36 layers in total and uses a repeating '4-layers-per-group' structure, where each group contains three sliding window layers that attend only to the most recent 512 tokens and one global layer that reads the entire text

Unverified50%
Sep 11

Industry solutions for improving long-context attention decay include sparse attention, sliding window attention, and RoPE positional encoding extrapolation, but currently no solution can completely eliminate this fundamental limitation.

Unverified50%
Aug 31

The KV Cache size of sliding window attention is constant, achieving O(1) memory usage rather than O(n).

Unverified50%

All Facts (7)

Source Articles