Sliding Window Attention Training for Efficient Large Language Models
Abstract
Recent advances in transformer-based Large Language Models (LLMs) have demonstrated remarkable capabilities across various tasks. However, their quadratic computational complexity concerning sequence length remains a significant bottleneck for processing long documents. As a result, many efforts like sparse attention and state space models have been proposed to improve the efficiency of LLMs over long sequences. Though effective, these approaches compromise the performance or introduce structural complexity. This calls for a simple yet efficient model that preserves the fundamental Transformer architecture. To this end, we introduce SWAT, which enables efficient long-context handling via Sliding Window Attention Training. This paper first attributes the inefficiency of Transformers to the attention sink phenomenon resulting from the high variance of softmax operation. Then, we replace softmax with the sigmoid function and utilize a balanced ALiBi and Rotary Position Embedding for efficient information compression and retention. Experiments demonstrate that SWAT achieves SOTA performance compared with state-of-the-art linear recurrent architectures on eight benchmarks. Code is available at https://anonymous.4open.science/r/SWAT-attention.
Community
This is an automated message from the Librarian Bot. I found the following papers similar to this paper.
The following papers were recommended by the Semantic Scholar API
- SWAN-GPT: An Efficient and Scalable Approach for Long-Context Language Modeling (2025)
- Efficient Pretraining Length Scaling (2025)
- RWKV-X: A Linear Complexity Hybrid Language Model (2025)
- Random Long-Context Access for Mamba via Hardware-aligned Hierarchical Sparse Attention (2025)
- LongMamba: Enhancing Mamba's Long Context Capabilities via Training-Free Receptive Field Enlargement (2025)
- Empirical Evaluation of Knowledge Distillation from Transformers to Subquadratic Language Models (2025)
- FreqKV: Frequency Domain Key-Value Compression for Efficient Context Window Extension (2025)
Please give a thumbs up to this comment if you found it helpful!
If you want recommendations for any Paper on Hugging Face checkout this Space
You can directly ask Librarian Bot for paper recommendations by tagging it in a comment:
@librarian-bot
recommend
Models citing this paper 0
No model linking this paper
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper
Collections including this paper 0
No Collection including this paper