미니맥스 희소 어텐션 (MiniMax Sparse Attention)
MiniMax Sparse Attention
최첨단 LLM(대규모 언어 모델)에게는 초장문 맥락 처리 능력이 필수적입니다. 에이전트 기반 워크플로우, 레포지토리 규모의 코드 추론, 그리고 지속적인 메모리 기능은 모델이 수십만에서 수백만 개의 토큰에 대해 동시에 주의를 기울여야 하지만, 소프트맥스 어텐션의 2차원 비용으로 인해 실제 배포 환경에서는 이러한 방식이 어렵습니다. 본 논문에서는 Grouped Query Attention (GQA)을 기반으로 구축된 블록 단위 희소 어텐션인 MiniMax Sparse Attention (MSA)을 소개합니다. 경량 Index Branch는 키-값 블록에 대한 점수를 매기고 각 GQA 그룹별로 독립적으로 Top-k 서브셋을 선택하여 그룹별 희소 검색을 가능하게 하면서도 효율적인 블록 수준의 실행을 유지합니다. Main Branch는 이후 선택된 블록에 대해서만 정확한 블록 희소 어텐션을 수행합니다. MSA는 단순성과 확장성을 원칙으로 설계되었으며, 의도적으로 간결하게 만들어 다양한 GPU 환경에서 효율적인 배포가 가능하도록 했습니다. 희소성을 실제 속도 향상으로 이어지도록 하기 위해, MSA는 exp-free Top-k 선택 및 KV-outer 희소 어텐션을 활용하는 GPU 실행 경로와 함께 공동 설계되었습니다. 109B 파라미터 모델에 네이티브 멀티모달 학습을 적용한 결과, MSA는 GQA와 동등한 성능을 보이면서 1M 맥락에서 토큰 당 어텐션 연산량을 28.4배 줄였습니다. 저희가 공동 설계한 커널과 함께 사용했을 때, MSA는 H800 GPU에서 프리필 속도를 14.2배, 디코딩 속도를 7.6배 향상시켰습니다. 저희의 추론 커널은 다음 링크에서 확인할 수 있습니다: https://github.com/MiniMax-AI/MSA. MSA를 기반으로 구축된 네이티브 멀티모달 모델은 공개적으로 배포되었습니다: https://huggingface.co/MiniMaxAI/MiniMax-M3.
Ultra-long-context capability is becoming indispensable for frontier LLMs: agentic workflows, repository-scale code reasoning, and persistent memory all require the model to jointly attend over hundreds of thousands to millions of tokens, yet the quadratic cost of softmax attention makes this untenable at deployment scale. We introduce MiniMax Sparse Attention (MSA), a blockwise sparse attention built upon Grouped Query Attention (GQA). A lightweight Index Branch scores key-value blocks and independently selects a Top-k subset for each GQA group, enabling group-specific sparse retrieval while maintaining efficient block-level execution; the Main Branch then performs exact block-sparse attention over only the selected blocks. Designed around a principle of simplicity and scalability, MSA is deliberately streamlined, making it straightforward to deploy efficiently across a broad range of GPUs. To translate sparsity into practical speedups, we co-design MSA with a GPU execution path that uses exp-free Top-k selection and KV-outer sparse attention to improve tensor-core utilization under block-granular access. On a 109B-parameter model with native multimodal training, MSA performs on par with GQA while reducing per-token attention compute by 28.4x at 1M context. Paired with our co-designed kernel, MSA achieves 14.2x prefill and 7.6x decoding wall-clock speedups on H800. Our inference kernel is available at: https://github.com/MiniMax-AI/MSA. A production-grade natively multimodal model powered by MSA has been publicly released at: https://huggingface.co/MiniMaxAI/MiniMax-M3.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.