Longformer's Hybrid Attention: Local Windows + Global Tokens

Longformer achieves its 16,384-token context by combining a fixed-size sliding window attention for local context with a few task-specific global attention tokens, effectively reducing the computational complexity from quadratic to linear.

Sources

Open the full topic