ChatPaper.aiChatPaper

MiniMax-Sparse-Attention

MiniMax Sparse Attention

June 11, 2026
Autoren: Xunhao Lai, Weiqi Xu, Yufeng Yang, Qiaorui Chen, Yang Xu, Lunbin Zeng, Xiaolong Li, Haohai Sun, Haichao Zhu, Vito Zhang, Pengyu Zhao
cs.AI

Zusammenfassung

Ultra-Langkontext-Fähigkeiten werden für moderne Large Language Models (Frontier-LLMs) unverzichtbar: Agenten-Workflows, codebasierte Schlussfolgerungen auf Repository-Ebene und dauerhafter Speicher erfordern alle, dass das Modell gemeinsam über Hunderttausende bis Millionen von Tokens aufmerksam wird, doch die quadratischen Kosten der Softmax-Aufmerksamkeit machen dies im Einsatzmaßstab untragbar. Wir stellen MiniMax Sparse Attention (MSA) vor, eine blockweise sparse Aufmerksamkeit, die auf Grouped Query Attention (GQA) aufbaut. Ein leichtgewichtiger Index-Zweig bewertet Schlüssel-Wert-Blöcke und wählt unabhängig ein Top-k-Subset für jede GQA-Gruppe aus, was gruppenspezifisches sparsames Retrieval ermöglicht, während die effiziente blockweise Ausführung erhalten bleibt; der Hauptzweig führt dann exakte block-sparse Aufmerksamkeit nur über die ausgewählten Blöcke durch. Entworfen nach einem Prinzip der Einfachheit und Skalierbarkeit, ist MSA bewusst schlank gehalten und ermöglicht eine unkomplizierte effiziente Bereitstellung auf einer breiten Palette von GPUs. Um Sparsity in praktische Beschleunigungen zu übersetzen, entwickeln wir MSA gemeinsam mit einem GPU-Ausführungspfad, der exp-freie Top-k-Auswahl und KV-äußere sparse Aufmerksamkeit nutzt, um die Tensor-Core-Auslastung bei blockgranularem Zugriff zu verbessern. In einem 109B-Parameter-Modell mit nativem multimodalen Training liefert MSA eine vergleichbare Leistung wie GQA, während es den Aufmerksamkeitsrechenaufwand pro Token bei 1M Kontext um das 28,4-fache reduziert. In Kombination mit unserem mitentwickelten Kernel erreicht MSA 14,2-fache Prefill- und 7,6-fache Decoding-Wall-Clock-Beschleunigungen auf H800. Unser Inferenz-Kernel ist verfügbar unter: https://github.com/MiniMax-AI/MSA. Ein produktionsreifes, nativ multimodales Modell, das auf MSA basiert, wurde unter https://huggingface.co/MiniMaxAI/MiniMax-M3 veröffentlicht.
English
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.