Saved in:
| Main Authors: | , , , , , , , , , , , , , , , , , , , , , , , , |
|---|---|
| Format: | Preprint |
| Published: |
2025
|
| Subjects: | |
| Online Access: | https://arxiv.org/abs/2502.13189 |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| _version_ | 1866910835413090304 |
|---|---|
| author | Lu, Enzhe Jiang, Zhejun Liu, Jingyuan Du, Yulun Jiang, Tao Hong, Chao Liu, Shaowei He, Weiran Yuan, Enming Wang, Yuzhi Huang, Zhiqi Yuan, Huan Xu, Suting Xu, Xinran Lai, Guokun Chen, Yanru Zheng, Huabin Yan, Junjie Su, Jianlin Wu, Yuxin Zhang, Neo Y. Yang, Zhilin Zhou, Xinyu Zhang, Mingxing Qiu, Jiezhong |
| author_facet | Lu, Enzhe Jiang, Zhejun Liu, Jingyuan Du, Yulun Jiang, Tao Hong, Chao Liu, Shaowei He, Weiran Yuan, Enming Wang, Yuzhi Huang, Zhiqi Yuan, Huan Xu, Suting Xu, Xinran Lai, Guokun Chen, Yanru Zheng, Huabin Yan, Junjie Su, Jianlin Wu, Yuxin Zhang, Neo Y. Yang, Zhilin Zhou, Xinyu Zhang, Mingxing Qiu, Jiezhong |
| contents | 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. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2502_13189 |
| institution | arXiv |
| publishDate | 2025 |
| record_format | arxiv |
| spellingShingle | MoBA: Mixture of Block Attention for Long-Context LLMs Lu, Enzhe Jiang, Zhejun Liu, Jingyuan Du, Yulun Jiang, Tao Hong, Chao Liu, Shaowei He, Weiran Yuan, Enming Wang, Yuzhi Huang, Zhiqi Yuan, Huan Xu, Suting Xu, Xinran Lai, Guokun Chen, Yanru Zheng, Huabin Yan, Junjie Su, Jianlin Wu, Yuxin Zhang, Neo Y. Yang, Zhilin Zhou, Xinyu Zhang, Mingxing Qiu, Jiezhong Machine Learning Artificial Intelligence Computation and Language 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. |
| title | MoBA: Mixture of Block Attention for Long-Context LLMs |
| topic | Machine Learning Artificial Intelligence Computation and Language |
| url | https://arxiv.org/abs/2502.13189 |