InAttention: Linear Context Scaling for Transformers
Not on the map. Why?
Abstract (arXiv)
VRAM requirements for transformer models scale quadratically with context length due to the self-attention mechanism. In this paper we modify the decoder-only transformer, replacing self-attention with InAttention, which scales linearly with context length during inference by having tokens attend only to initial states. Benchmarking shows that InAttention significantly reduces VRAM usage during inference, enabling handling of long sequences on consumer GPUs. We corroborate that fine-tuning extends context length efficiently, improving performance on long sequences without high training costs. InAttention offers a scalable solution for long-range dependencies in transformer models, paving the way for further optimization.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 8 of its 10 references that are in the map. First posted on arXiv 9 Oct 2024.
Builds on
8 of 10 references.
References · 8
- 2020Longformer: The Long-Document Transformercited by 3,413
- 2020Big Bird: Transformers for Longer Sequencescited by 1,684
- 2019Generating Long Sequences with Sparse Transformerscited by 1,546
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,103
- 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 740
- 2023Landmark Attention: Random-Access Infinite Context Length for Transformerscited by 213
- 2021Combiner: Full Attention Transformer with Sparse Computation Costcited by 64
Built on by
Not cited yet.