atlas

Research map / Architectures and efficiency / Attention and transformers

MoBA: Mixture of Block Attention for Long-Context LLMs

NeurIPS 2025 · Architectures and efficiency › Attention and transformers · approach: Sparse attention for long-context LLMs · 8 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes MoBA, a trainable block-sparse attention that routes each query to top-k KV blocks via MoE-style gating, and can switch between full and sparse attention; continually pre-trains Llama-3.1-8B to 1M context.

Problem

Quadratic cost of standard attention limits long-context LLMs; existing sparse methods use predefined structure (sink, sliding window) or linear approximations that are weak on complex reasoning and hard to adapt to pretrained Transformers.

Approach

Apply the Mixture-of-Experts top-k gating to attention: partition KV into blocks, score each block by query–mean-pooled-key inner product, route each query to top-k blocks plus its own current block (causal), so the model learns where to attend with no predefined bias and the same parameters allow switching between full and sparse attention.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use MoBA attention instead of full attentionLlama-8B-1M · GSM8K [5-shot]score: 0.7142 -> 0.7278Helped
Use MoBA attention instead of full attentionLlama-8B-1M · RULER @128K [0-shot]score: 0.7849 -> 0.7818Hurt
Use MoBA attention instead of full attentionLlama-8B-1M · Long-context benchmarksscoreMixed
Use finer-grained block segmentation at consistent 75% attention sparsity (ablation)MoBA 1.5B, 32K context · Validation setLM loss: 1e-2Helped
Switch the final Transformer layers from MoBA to full attention during SFT (ablation)MoBA layer-wise hybrid · SFTLM lossHelped
Train with MoBA/full hybrid: MoBA for 90% of tokens, then full attention (ablation)1.5B model, 32K context · Position-wise LM lossLM lossHelped
Train exclusively with MoBA rather than using the MoBA/full hybrid recipe (ablation)1.5B model, 32K context · Trailing tokensPosition-wise LM lossHurt

Surprising findings

Limitations

Experimental setup

Datasets: Long-context pretraining corpus (unspecified) SFT data (unspecified)

Benchmarks: AGIEval BBH CEval GSM8K HellaSWAG Loogle Competition Math MBPP MBPP Sanitized MMLU MMLU Pro OpenAI HumanEval

Metrics: accuracy pass@1 LM loss trailing LM loss speedup ratio attention computation time

Baselines: Full attention (Llama-8B-1M-Full) FlashAttention Quest Longheads

Builds on: Mixture of Experts FlashAttention Quest sliding window attention attention sink

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy