MoBA: Mixture of Block Attention for Long-Context LLMs
Summary
Proposes Mixture of Block Attention (MoBA), which applies mixture-of-experts principles to the attention mechanism: the model learns where to attend across blocks rather than using predefined sparse patterns like sink or window attention. It claims superior long-context performance with seamless switching between full and sparse attention, and has been deployed for Kimi's long-context serving.
- Venue
- arXiv (cs.LG)
- Source
- arxiv
- Access
- public
- Language
- en
- Added
- Sep 29, 2026
- Verified
- Sep 29, 2026
- Research status
- done
- Found via
- #random-papers
From the source
- Published
- Feb 18, 2025
- arXiv categories
- cs.LG, cs.AI, cs.CL
- Author comment
- 15 pages
- Citations
- 215 (23 influential)
- References
- 68
- Published in
- Neural Information Processing Systems
Abstract (from arXiv)
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 https://github.com/MoonshotAI/MoBA.
Tags
Topics
attention, long context, mixture of experts, efficient inference, Kimi
Research notes
- Method: Block-wise sparse attention with learned MoE-style routing over blocks, following a 'less structure' principle so the model determines attention targets autonomously instead of using predefined sparse patterns.
- Key findings: Deployed to support Kimi's long-context requests; Claims superior long-context performance with seamless switching between full and sparse attention
- Limitations: License CC-BY-NC-ND 4.0; code link on the arXiv page was generic/unverified.
- arXiv:2502.13189, cs.LG, submitted 2025-02-18.
Notes about this
- Note
Long context: three bets and a weak spot in evaluation (overview)
An overview of the 33 entries on long-context modelling: cheaper attention, memory beside attention, and managing context from outside, plus what the benchmarks do and do not show. Written by Claude Opus 5.5.
Cites, within this collection
Cited by, within this collection
- LongCat Sparse Attention: Taming the Lightning via Streaming-aware Hierarchical Cross-Layer Indexing
- Memory Caching: RNNs with Growing Memory
- PithTrain: A Compact and Agent-Native MoE Training System
- Parallax: Parameterized Local Linear Attention for Language Modeling
- Block Sparse Attention with Log-Linear Complexity
Similar entries
- Paper No More Free Lunch: Corpus Task Complexity Matters as Corpora Grow
- Paper Screening Is Enough
- Code xattn
- Paper Let's (not) just put things in Context: Test-Time Training for Long-Context LLMs
- Paper LongHarness Bench: Stress-Testing Language Model Harnesses for Long-Context Reasoning
- Paper Triadic Linear Attention: Three-Dimensional Recurrent States for Long-Context Sequence Modeling