Back to blog

MiniMax Sparse Attention (MSA)

面向 LLM 训练的 GQA-based blockwise sparse attention 机制,通过轻量 Index Branch 实现 per-GQA-group Top-k 选择,在 109B MoE 模型上实现 28.4× FLOPs 减少和 14.2× prefill / 7.6× decoding 加速

MiniMax Sparse Attention (MSA)

一、论文概述

项目内容
标题MiniMax Sparse Attention (MSA)
作者Xunhao Lai, Weiqi Xu, Yufeng Yang, Qiaorui Chen, Yang Xu, Lunbin Zeng, Xiaolong Li, Haohai Sun, Haichao Zhu, Vito Zhang, Jinkai Hu, Jiayao Li, Rui Gao, Zekun Li, Songquan Zhu, Jingkai Zhou, Pengyu Zhao
机构MiniMax (主要), NVIDIA, 北京大学, 浙江大学, 华中科技大学, 南京大学, 杭州电子科技大学
论文arXiv:2606.13392
代码https://github.com/MiniMax-AI/MSA
模型https://huggingface.co/MiniMaxAI/MiniMax-M3
发布2026-06-11 (v1); 2026-07-15 (v2)
许可arXiv.org perpetual non-exclusive license

核心贡献:

  1. 提出 MSA——一种基于 GQA 的 blockwise sparse attention 机制,通过轻量 Index Branch 为每个 GQA group 独立选择 Top-k KV blocks,Main Branch 仅在选中 blocks 上执行精确 softmax attention
  2. 设计 exp-free Top-k 选择和 KV-outer sparse attention GPU kernel,利用 pre-scheduled tile chunking + two-phase combine + query concatenation 解决 sink row 导致的负载不均衡问题
  3. 提出 KL alignment loss 训练 Index Branch,配合 gradient detach、indexer warmup 和 forced local block 三项稳定训练的技术
  4. 在 109B 参数 MoE 模型(3T tokens)上验证:MSA 在下游基准上与 GQA 表现相当,同时将 1M context 下的 per-token attention FLOPs 减少 28.4×
  5. 配套 kernel 在 H800 上实现 14.2× prefill 和 7.6× decoding wall-clock speedup
  6. 支持两种训练路线:从头稀疏预训练(MSA-PT)和从稠密 checkpoint 转换(MSA-CPT)

二、核心思想

问题定义

LLM 正从短对话转向长 horizon agentic workflows(数百个 interleaved reasoning 和 action steps),需要同时处理数十万到数百万 token。Softmax attention 的二次计算成本在部署规模下变得不可接受。

现有两条技术路线:

  1. 混合架构:用 linear attention 或 sliding window 替换部分 softmax layers
  2. 稀疏 softmax attention:直接对 softmax attention 本身做稀疏化

MSA 遵循 Occam’s razor——保留最必要组件,在 sparse softmax attention 范式下最大化复用现有软硬件基础设施。

解决方案概述

MSA 采用两阶段稀疏注意力架构:

Input X → Index Branch → Top-k block selection (per GQA group)
          ↓
Input X → Main Branch → Softmax attention over selected blocks only

Index Branch:引入一个 index query head(每个 GQA group 一个)和一个共享的 index key head,通过 block-level max-pooling 对 KV blocks 打分并选择 Top-k。local block 始终保留以保证训练稳定性。

Main Branch:在选中的 blocks 上执行标准 scaled dot-product attention。

训练策略:Top-k 选择不可微,通过 KL alignment loss 对齐 Index Branch 的分布与 Main Branch 在选中 token 上的分布。配合 stop-gradient 隔离辅助目标与 backbone。

MSA 架构总览:Index Branch(左)用单个轻量 head 对完整因果上下文打分并为每个 query 和 GQA group 选择 k 个 key blocks;Main Branch(右)仅对选中 blocks 执行精确 block-sparse attention

三、技术架构

整体框架

MSA 建立在 Grouped Query Attention (GQA) 之上:

组件参数量功能
Main Branch Q/K/V与 GQA 相同标准注意力投影
Index Branch QHkv×didxH_{kv} \times d_{\text{idx}}每个 GQA group 一个 index query head
Index Branch K1×didx1 \times d_{\text{idx}}全局共享 index key head
Output projection与 GQA 相同最终输出投影

核心公式

Causal Attention with GQA(Eq. 1)

ot(h)=∑i≤tαt,i(h)vi(h),αt,i(h)=exp⁡(⟨qt(h),ki(h)⟩/dh)∑j≤texp⁡(⟨qt(h),kj(h)⟩/dh)(1){\bm{o}}_{t}^{(h)} = \sum_{i \leq t} \alpha_{t,i}^{(h)} {\bm{v}}_{i}^{(h)}, \qquad \alpha_{t,i}^{(h)} = \frac{\exp\left(\langle{\bm{q}}_{t}^{(h)},{\bm{k}}_{i}^{(h)}\rangle/\sqrt{d_h}\right)}{\sum_{j \leq t}\exp\left(\langle{\bm{q}}_{t}^{(h)},{\bm{k}}_{j}^{(h)}\rangle/\sqrt{d_h}\right)} \tag{1}

GQA 将 HqH_q 个 query heads 分为 HkvH_{kv} 个 groups,G=Hq/HkvG = H_q/H_{kv} 个相邻 query heads 共享一个 KV head。

Sparse Attention Two-Stage Formulation(Eq. 2)

Ii=Indexϕ(qi,K≤i),oi=Attn(qi,K[Ii],V[Ii])(2){\mathcal{I}}_i = \mathrm{Index}_\phi({\bm{q}}_i, {\bm{K}}_{\leq i}), \qquad {\bm{o}}_i = \mathrm{Attn}({\bm{q}}_i, {\bm{K}}[{\mathcal{I}}_i], {\bm{V}}[{\mathcal{I}}_i]) \tag{2}

Block Partition(Eq. 4)

Bb={(b−1)Bk+1,…,min⁡(bBk,N)},b=1,…,B,B=⌈N/Bk⌉(4){\mathcal{B}}_b = \{(b{-}1)B_k+1,\dots,\min(bB_k,N)\}, \qquad b=1,\dots,B, \quad B=\lceil N/B_k\rceil \tag{4}

Index Branch Scoring(Eq. 5-7)

Index query/key projections:

Qidx=XWqidx∈RN×Hkv×didx,Kidx=XWkidx∈RN×1×didx(5){\bm{Q}}^{\rm idx} = {\bm{X}}{\bm{W}}_q^{\rm idx} \in \mathbb{R}^{N\times H_{kv}\times d_{\rm idx}}, \qquad {\bm{K}}^{\rm idx} = {\bm{X}}{\bm{W}}_k^{\rm idx} \in \mathbb{R}^{N\times 1\times d_{\rm idx}} \tag{5}

Token-level scoring + block-level max pooling:

Si,jidx,(r)=(Qidx)i(r)(Kidx)j⊤didx,Mi,bidx,(r)=max⁡j∈Bbj≤iSi,jidx,(r)(6)S^{\rm idx,(r)}_{i,j} = \frac{({\bm{Q}}^{\rm idx})^{(r)}_i ({\bm{K}}^{\rm idx})_j^\top}{\sqrt{d_{\rm idx}}}, \qquad M^{\rm idx,(r)}_{i,b} = \max_{\substack{j \in {\mathcal{B}}_b \\ j \leq i}} S^{\rm idx,(r)}_{i,j} \tag{6}

Top-k block selection(local block always included):

Ii(r)=TopKb∈{1,…,B} ⁣(Mi,⋅idx,(r), k)(7){\mathcal{I}}_i^{(r)} = \mathrm{TopK}_{b \in \{1,\dots,B\}}\!\big(M^{\rm idx,(r)}_{i,\cdot},\, k\big) \tag{7}

Main Branch Attention(Eq. 8)

Oi(h)=softmax ⁣(Qi(h) (K(r)[Ii(r)])⊤dh)V(r) ⁣[Ii(r)](8){\bm{O}}_i^{(h)} = \mathrm{softmax}\!\left(\frac{{\bm{Q}}_i^{(h)}\,\big({\bm{K}}^{(r)}[{\mathcal{I}}_i^{(r)}]\big)^\top}{\sqrt{d_h}}\right){\bm{V}}^{(r)}\!\big[{\mathcal{I}}_i^{(r)}\big] \tag{8}

每 query 注意力成本从 O(N)O(N) 降至 O(kBk)O(kB_k),随序列长度增加保持固定。

KL Alignment Loss(Eq. 9-10)

Index 和 Main Branch 在选中 token 集 Ii,tok(r){\mathcal{I}}_{i,\mathrm{tok}}^{(r)} 上的分布:

Pi,jidx,(r)=exp⁡(Si,jidx,(r))∑u∈Ii,tok(r)exp⁡(Si,uidx,(r)),Pi,j(r)=1G∑ℓ∈Hrexp⁡(Si,j(ℓ))∑u∈Ii,tok(r)exp⁡(Si,u(ℓ))(9)P^{\rm idx,(r)}_{i,j} = \frac{\exp(S^{\rm idx,(r)}_{i,j})}{\sum_{u \in {\mathcal{I}}_{i,\mathrm{tok}}^{(r)}}\exp(S^{\rm idx,(r)}_{i,u})}, \qquad P^{(r)}_{i,j} = \frac{1}{G}\sum_{\ell \in \mathcal{H}_r}\frac{\exp(S^{(\ell)}_{i,j})}{\sum_{u \in {\mathcal{I}}_{i,\mathrm{tok}}^{(r)}}\exp(S^{(\ell)}_{i,u})} \tag{9}

KL 损失(teacher distribution detached):

LKL=1NHkv∑i=1N∑r=1HkvDKL(stopgrad(Pi,⋅(r)) ∥ Pi,⋅idx,(r))(10)\mathcal{L}_{\rm KL} = \frac{1}{NH_{kv}}\sum_{i=1}^N\sum_{r=1}^{H_{kv}} D_{\mathrm{KL}}\big(\mathrm{stopgrad}(P^{(r)}_{i,\cdot}) \,\|\, P^{\rm idx,(r)}_{i,\cdot}\big) \tag{10}

Gradient Detach(Eq. 11)

Qidx=stopgrad(X)Wqidx,Kidx=stopgrad(X)Wkidx(11){\bm{Q}}^{\rm idx} = \mathrm{stopgrad}({\bm{X}}){\bm{W}}_q^{\rm idx}, \qquad {\bm{K}}^{\rm idx} = \mathrm{stopgrad}({\bm{X}}){\bm{W}}_k^{\rm idx} \tag{11}

隔离辅助目标与 backbone,LKL\mathcal{L}_{\rm KL} 仅更新 Wqidx{\bm{W}}_q^{\rm idx} 和 Wkidx{\bm{W}}_k^{\rm idx}。

Computational Complexity(Eq. 12)

FGQA(N)=2HqdhN2,FMSA(N)=HkvdidxN2⏟Index Branch+4HqdhNkBk⏟Main Branch(12)F_{\rm GQA}(N) = 2H_qd_hN^2, \qquad F_{\rm MSA}(N) = \underbrace{H_{kv}d_{\rm idx}N^2}_{\text{Index Branch}} + \underbrace{4H_qd_hNkB_k}_{\text{Main Branch}} \tag{12}

当 kBk≪NkB_k \ll N 时,FLOPs 差距随 NN 增长而增大。

训练流程(Algorithm 1)

Algorithm 1: One MSA layer training forward
Input: hidden states X ∈ R^(N×d_model), block size B_k, selected blocks k

1: Q, K, V ← XW_q, XW_k, XW_v                    // standard GQA projections
2: Q_idx, K_idx ← stopgrad(X)W_q_idx, stopgrad(X)W_k_idx  // detached index projections
3: M_idx ← BlockMaxPool(Q_idx, K_idx, B_k)         // per-group causal block scores
4: I ← TopK(M_idx, k)                              // selected block indices (local always included)
5: O ← TopKAttn(Q, K, V, I)                        // attends to selected blocks
6: output ← OW_o                                    // final projection
7: L_KL ← KLdiv(Q_idx, K_idx, stopgrad(Q), stopgrad(K), I)  // over selected tokens
8: return output, L_KL

完整训练损失:L=LLM+λ∑layersLKL\mathcal{L} = \mathcal{L}_{\rm LM} + \lambda \sum_{\text{layers}} \mathcal{L}_{\rm KL}

训练技术

技术说明
KL Loss对齐 Index Branch 与 Main Branch 在选中 token 上的分布
Gradient Detachstop-gradient 隔离 Index Branch 输入,防止 KL 梯度影响 backbone
Indexer Warmup两阶段训练:前 40B tokens 全注意力+KL loss 初始化 indexer,之后切换稀疏注意力
Local Block每个 query 位置的 local block 始终被选中,防止退化选择

Pretraining dynamics:MSA-PT 与 Full Attention 的 LM loss 曲线几乎不可区分,gradient norm 在同一范围内

Sparse CPT dynamics:KL loss 在 warmup 阶段快速下降,sparse CPT 期间保持低位;block recall 和 score recall 均表现良好

四、核心创新

创新点说明依据
Per-GQA-group independent block selection每个 GQA group 独立选择 Top-k blocks,兼顾多组特异性和块级执行效率Eq. (5)-(7): 单 index key head 共享,每 group 一个 index query head
Exp-free Top-k selection跳过 softmax 的 max/exp/sum 步骤,raw scores 直接用于排序Section 4.1: 在 k=16k=16 设置下比 torch.topk 快 5.1×
KV-outer sparse attention选择 KV-outer 而非 Q-outer 迭代以最大化 arithmetic intensityFLOPs/IO: Q-outer ≈ G vs KV-outer ≈ 2/3 BkB_k
Pre-scheduled tile chunking解决 sink row 导致的热点 CTA 问题,将热门 tile 拆分给多个 CTASection 4.2: 避免 atomic updates
Two-phase forward with PDLSplit-K softmax normalization + Programmatic Dependent Launch 隐藏 inter-kernel 延迟Section 4.2
Sparse KL loss fusion跳过 KL loss forward pass,在主 pass 中直接 emit LSE scalarsSection 4.3
Dynamic load balancingPersistent grid + global atomic counter 处理 variable-length sequences 下的 per-tile work 差异Section 4.3

五、GPU Kernel 设计

4.1 Index & TopK Kernel

Exp-free selection:由于 softmax 是 order-preserving,直接用 raw scores 进行 Top-k 选择,跳过 softmax 计算。

Per-thread register top-k:

  • Block size Bk=128B_k = 128,selection k=16k = 16
  • Warp 的 32 lanes 各流式处理 1/32 stride 的 input row
  • 每个 lane 在 shared memory 中维护 kk-element min-heap
  • Heap root 缓存在 register 中,insertions 使用 deferred writes
  • 最后 kk-round shuffle merge 合并 32 个局部 Top-k 结果

Benchmark(Table 1):

Seq Len NBlocks Bktorch.topkTileLangOursvs. torchvs. TileLang
128K1024163970 μs2864 μs779 μs5.1×3.7×
128K1024325378 μs3630 μs1991 μs2.7×1.8×
512K40961633810 μs17779 μs7880 μs4.3×2.3×
512K81923257659 μs26100 μs21326 μs2.7×1.2×

4.2 Sparse Attention Kernel

Q-outer vs KV-outer 分析:

  • Q-outer: FLOPs/IO ≈ GG(GQA ratio)
  • KV-outer: FLOPs/IO ≈ 23Bk\frac{2}{3}B_k

由于 23Bk≫G\frac{2}{3}B_k \gg G in practice,选择 KV-outer iteration with Q gather。

Two-phase forward:

  1. Phase 1: Attention kernel 写入 per-partial outputs 到 Obuf∈Rk×n×Hq×d\mathbf{O}_{\text{buf}} \in \mathbb{R}^{k \times n \times H_q \times d}
  2. Phase 2: Combine kernel 计算 split-K softmax normalization

4.3 Sparse KL Loss Fusion

  • 跳过 KL loss forward pass,直接在 main pass 中 emit LSE scalars
  • Backward kernel 直接从 global memory 加载标量到 softmax
  • 每个 block 保存 LSE,对 top-k blocks 做 reduction 得到 LSEidx\mathrm{LSE}_{\rm idx}

六、实验结果

实验设置

配置项值
Model109B MoE (41 layers: 3 dense + 38 MoE)
Parameters109B total, 6B active per token
Vocabulary200K tokens
Hidden size3072
Attention64 query heads, 4 KV heads (G=16G=16), dh=128d_h=128, RoPE=64
MoE128 routed experts + 1 shared expert, top-4 routing
Training budget3T tokens
Block sizeBk=128B_k = 128
Selected blocksk=16k = 16 (2,048 KV tokens per query)
HardwareH800 for kernel benchmarks; multi-GPU for training
BaselinesFlashAttention (Full GQA), SageAttention, SpargeAttention, SVG2, Jenga

主结果(Table 2)

General Knowledge & Reasoning:

BenchmarkFullMSA-PTMSA-CPT
MMLU67.067.266.8
MMLU-Pro38.538.839.1
BBH67.766.666.1
GPQA Hard25.926.326.3
ARC Challenge82.782.582.9
TriviaQA66.065.567.7
WinoGrande58.360.962.0

Math:

BenchmarkFullMSA-PTMSA-CPT
GSM8K76.277.773.7
MGSM44.146.044.2
MathVista43.846.844.5
OlymMATH Easy23.026.022.0

Code:

BenchmarkFullMSA-PTMSA-CPT
HumanEval61.064.057.9
EvalPlus59.461.860.0
BigCodeBench44.844.045.7
MBPP P@1082.181.681.1

Long-context Retrieval:

BenchmarkFullMSA-PTMSA-CPT
RULER-8K79.884.277.2
RULER-32K75.077.575.7

MSA-PT 在多数数学、图像、视频和长上下文检索基准上表现最强,表明原生稀疏预训练可以让模型表示适应稀疏注意力模式。MSA-CPT 在文本、代码和 PPL 评估上更接近 Full Attention,是已有稠密 checkpoint 的实用转换路线。

长上下文扩展(Table 3)

从 MSA-CPT checkpoint 继续约 140B tokens 的长上下文训练后:

BenchmarkFullMSA-CPT (extended)Δ
HELMET-128K Overall46.5345.93-0.60
HELMET ICL70.4072.80+2.40
RULER-128K Overall72.0072.12+0.12
RULER MK/MQ/MV96.6398.87+2.24

每个 query 仅 attends to kBk=16×128=2,048kB_k = 16 \times 128 = 2,048 KV tokens,MSA-CPT 仍保持接近 Full Attention 的长上下文能力。

效率对比(Figure 4)

效率对比:MSA 将 per-token attention FLOPs 大幅降低,在 1M tokens 处达到 28.4× FLOPs 减少

  • Prefill speedup: 在 1M context 下达到 14.2×(H800)
  • Decoding speedup: 在 1M context 下达到 7.6×(H800)

训练效率消融(Table 4)

方法Token 数Prefill SpeedupDecode Speedup
FlashAttention1M1.00×1.00×
FlashAttention32K1.00×1.00×
MSA1M14.2×7.6×
MSA32K~2.5×~1.8×

性能开销(Table 5)

MSA 引入的额外计算开销极小:

指标变化
Index computation overhead< 0.1% of total FLOPs
Memory overhead两个额外的投影矩阵 Wqidx,WkidxW_q^{\rm idx}, W_k^{\rm idx}
KV cache reduction从 NN 降至 kBk=2048kB_k = 2048 tokens per query

七、消融实验与可视化分析

训练动态可视化

Index selection pattern(Figure 5):不同 GQA group 选择不同 long-range stripes,同时共享 local diagonal 和 sink column 模式,说明 learned indexer 捕获了 group-specific 的稀疏注意力模式而非坍缩为单一全局模式。

Index visualization:Layer 1 四个 GQA group 各自不同的 long-range selection pattern;Layer 18 的 long-range selection 锐化为每组几条 stripe

Attention sink(Figure 6):即使没有显式强制 indexer 选择第一个 KV block,learned Index Branch 自然地跨所有层和 heads 对初始 block 分配高选择概率。

Attention sink:Layer 4 和 Layer 24 的所有 heads 都向第一个 token 分配了大量注意力质量

Indexer 训练信号消融(Appendix B.2, Figure 7)

配置短上下文长上下文平衡
LM Loss only好差❌
KL Loss only差好❌
LM + KL Loss好好✅

Gradient Detach 消融(Appendix B.3, Figures 8-9)

Detaching KL gradient 从 backbone 防止 auxiliary loss 污染主训练目标,在通用基准上保持一致的性能。

Indexer Warmup(Appendix B.4, Figure 11)

Index warmup 在训练早期显著改善收敛行为,使 indexer 在全注意力阶段学习合理的 block 选择模式后再切换到稀疏模式。

Block Size 消融(Appendix C.1, Table 4)

Block SizeTAU2 PPLRULER-8KRULER-32K
321.17672.566.1
641.17672.865.3
1281.17673.864.6

较大 block size 对模型质量影响有限,同时提升 kernel 效率。

Forced Sink & Local Selection(Appendix C.2, Table 5)

移除 forced first-block 和 fixed local window 后,模型仍然自然学习到这些模式,说明不需要硬编码选择规则。

Index Branch Value Head(Appendix C.3, Table 6)

一旦使用 indexer warmup,index value head 不再是必需的。移除后在大多数基准上没有系统性退化。

Learnable Sink(Appendix B.3, Figures 12-13)

引入 GPT-OSS 风格的 learnable sink 参数后,部分 heads 的 sink-like 注意力被 learnable sink 吸收,部分仍集中在第一个 token,但对下游 agent-oriented 评估的 perplexity 没有一致改善。

Learnable sink visualization:learnable sink 和 first token 的注意力分布(Figure 12)

Learnable sink results:加不加 learnable sink 在下游 agent 评估上无一致改善(Figure 13)

Sliding-Window Ablation(Appendix B.4, Figure 14)

与 FLOPs-matched sliding window baseline 相比,MSA 在多项 agent-oriented 评估上达到更低 perplexity,说明选择性稀疏优于固定窗口。

SW ablation:MSA vs FLOPs-matched sliding window 的 perplexity 对比(Figure 14)

八、与相关工作对比

方法稀疏时机是否训练Selector粒度GQA 支持
MSA (Ours)Native是Per-GQA-group Top-kBlock✅
NSANative是3 parallel branchesBlock❌ (MQA/MHA)
MoBANative是Block-averaged keysLarge block✅
DSANative是Multi-head ReLU lightningToken-level❌ (MLA)
InfLLM-V2Inference否Parameter-freeBlock+SW❓
H2OInference否Accumulated statsToken❓
SnapKVInference否Attention statsToken❓
QuestInference否Page-level importancePage❓
Sliding WindowFixed否N/AFixed window✅

MSA 与相近工作的两个区别轴:

  1. Per-GQA-group Top-k sharing combined with block-level selection:多组块级稀疏检索,同时保持 KV reads 连续性
  2. Indexed by a lightweight dot-product scorer:相比 MoBA 的 block-averaged keys 更精细

九、总结

核心贡献

  1. MSA 机制:minimal、scalable、accelerated 的 blockwise sparse attention,支持从头训练和 near-lossless 转换
  2. Kernel co-design:exp-free Top-k + KV-outer sparse attention + two-phase forward,将理论 FLOP 节省转化为实际 wall-clock 加速
  3. 109B MoE 大规模验证:native multimodal 训练 3T tokens,MSA-PT 和 MSA-CPT 两种训练路线均在下游基准上与 GQA 持平
  4. 28.4× FLOPs 减少:在 1M context 下,配合 kernel 实现 14.2× prefill 和 7.6× decoding 加速

局限性

  1. 长上下文检索仍有残差 gap:与 Full Attention 相比,某些长上下文检索任务(如 HELMET Rerank/RAG -2.10)仍存在性能差距
  2. Block size 选择依赖 workload:虽然消融显示 block size 影响有限,但最优值可能因具体任务而异
  3. 当前仅验证 pretraining:RL post-training 和 agentic deployment 场景下的适用性尚待探索
  4. Index Branch 增加少量 FLOPs:虽然占比 < 0.1%,但在极端资源受限场景下仍需权衡

未来方向

  1. 通过更长稀疏训练、更大 selection budget 或更丰富的 indexer scoring function 缩小残差长上下文检索 gap
  2. 将 selector-only 设计扩展到 RL post-training 和 agentic deployment
  3. 探索不同 GQA ratio 和 block size 组合的自动化搜索

十、参考资源

附图索引

编号文件名说明
Figure 1figure-1-msa-architecture.pngMSA 架构总览:Index Branch + Main Branch
Figure 2figure-2-training-dynamics.pngPretraining dynamics:LM loss 和 gradient norm
Figure 3figure-3-cpt-dynamics.pngSparse CPT dynamics:KL loss 和 selection recall
Figure 4figure-4-efficiency.png效率对比:FLOPs 减少和 runtime speedup
Figure 5figure-5-index-visualization.pngIndex selection probability across layers and GQA groups
Figure 6figure-6-attention-sink.pngAttention sink effect across heads and layers
Figure 7figure-7-indexer-training-signals.pngIndexer training signal ablation (LM/LM+KL)
Figure 8figure-8-gradient-detach-loss.pngGradient detach effect on LM loss and gradient norm
Figure 9figure-9-gradient-detach-benchmarks.pngGradient detach effect on benchmark scores
Figure 10figure-10-per-layer-entropy.pngPer-layer entropy of Main Branch attention during training
Figure 11figure-11-index-warmup.pngIndex warmup effect on training curves
Figure 12figure-12-learnable-sink-vis.pngLearnable sink vs first token attention distribution
Figure 13figure-13-learnable-sink-results.pngPerplexity comparison with/without learnable sink
Figure 14figure-14-ablation-swa-ppl.pngMSA vs FLOPs-matched sliding window ablation

附表格索引

编号说明
Table 1Top-k latency benchmark (torch.topk vs TileLang vs Ours)
Table 2Main evaluation results: Full vs MSA-PT vs MSA-CPT
Table 3Long-context extension on HELMET and RULER
Table 4Block size ablation (32/64/128)
Table 5Forced sink and local selection ablation
Table 6Index Branch value head ablation (with-value vs no-value)