Sliding-Window Attention
Each token attends only to the w tokens preceding it, making cost linear in sequence length and the effective receptive field L·w after L layers.
This entry is a stub. The maths has not been rederived by hand, or the implementation has not been run on real tensors, so it is recorded here as an open question rather than an answer.
Read what follows as a pointer to the sources, not as a settled account.
Masking every query to a band of preceding keys makes the cost rather than , and stacking such layers gives an effective receptive field of — information propagates, but only at one window per layer.
What is not yet settled here, and the reason this is a stub, is how the band interacts with the position scheme and with attention sinks: the first few tokens appear to matter far more than the band alone would predict.