[2502.13189] MoBA: Mixture of Block Attention for Long-Context LLMs
Abstract:Scaling the effective context length is essential for advancing large language models (LLMs) toward artificial general intelligence (AGI). However, the quadratic increase in computational complexity inherent in traditional attention mechanisms presents a prohibitive overhead. Existing approaches either impose strongly biased structures, such as sink or window attention which are task-specific, or radically modify the attention mechanism into linear approximations, whose performance in complex reasoning tasks remains inadequately explored. In this work, we propose a solution that adheres to the ``less structure'' principle, allowing the model to determine where to attend autonomously, rather than introducing predefined biases. We introduce Mixture of Block Attention (MoBA), an innovative approach that applies the principles of Mixture of Experts (MoE) to the attention mechanism. This novel architecture demonstrates superior performance on long-context tasks while offering a key advantage: the ability to seamlessly transition between full and sparse attention, enhancing efficiency without the risk of compromising performance. MoBA has already been deployed to support Kimi's long-context requests and demonstrates significant advancements in efficient attention computation for LLMs. Our code is available at this https URL.
M O BA: M IXTURE OF B LOCK ATTENTION FOR L ONG -C ONTEXT LLM S T ECHNICAL R EPORT Enzhe Lu1 Zhejun Jiang1 Jingyuan Liu1 Yulun Du1 Tao Jiang1 Chao Hong1 Shaowei Liu1 Weiran He1 Enming Yuan1 Yuzhi Wang1 Zhiqi Huang1 Huan Yuan1 arXiv:2502.13189v1 [cs.LG] 18 Feb 2025…
related reading
- 2502.13189arxiv.org
- 2502.11089arxiv.org
- Optimizing Mixture of Block Attentionarxiv.org
- [2512.23675] End-to-End Test-Time Training for Long Contextarxiv.org
- [2205.14135] FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenessarxiv.org
- [2603.23516] MSA: Memory Sparse Attention for Efficient End-to-End Memory Model Scaling to 100M Tokensarxiv.org
- [2501.00663] Titans: Learning to Memorize at Test Timearxiv.org
- Extending Context is Hard | kaiokendevkaiokendev.github.io
- [2604.20920] Simplified Sparse Attention via Gist Tokensarxiv.org
- [2506.06266] Cartridges: Lightweight and general-purpose long context representations via self-studyarxiv.org
- Log-Linear Attentionarxiv.org
- Kimi Linear: An Expressive, Efficient Attention Architecturearxiv.org