小米 MiMo 团队发布 HySparse2 注意力架构
小米 MiMo 团队搞了个新注意力架构,1M 上下文时 prefill 计算量和 KV cache 都砍到原来的几分之一,长文检索分数还涨了,做长上下文部署的可以看看论文。
小米 MiMo 团队宣布 MiMo-V3 将采用新注意力架构 HySparse2。该架构通过 KV Bridging 和 KV Reuse 两级 KV 共享,在 80B-A3B 的 MoE 模型上,1M tokens 时 prefill FLOPs 降至上一代 Hybrid SWA 的 1/5.02,KV cache 从 12.09 GB 降到 2.69 GB。架构上采用 token 级选择取代 64-token 块级选择,RULER-v2 提升 6.6、MRCR-v2 提升 8.1。由于 cross-decoder 的 KV 全部源自前 25 层 self-decoder,prefill 可提前退出,后 24 层整段跳过。论文已发布在 arXiv。
小米 Mimo 团队 @_LuoFuli 宣布 MiMo-V3 的新注意力架构「HySparse2」:这种混合稀疏注意力机制通过 “两级 KV 共享” 把 prefill 计算量、KV cache 大小和长程检索精度这三个通常互相牵制的目标同时拿下 在 80B-A3B 的 MoE 模型上,1M tokens 时 prefill FLOPs 仅为上一代 Hybrid SWA 的 1/5,KV cache 为其 1/4.5,而长程检索基准(RULER-v2、MRCR-v2)反而大幅领先,HySparse2 论文已发布: arxiv.org/pdf/2609.26368 # 核心机制:两级 KV 共享 外层:KV Bridging(借鉴 YOCO)。模型分成 self-decoder(前 25 层,混合 SWA)和 cross-decoder(后 24 层,混合稀疏注意力)。cross-decoder 中全注意力层的 K/V 不再从词嵌入独立投影,而是由 self-decoder 全注意力层的隐状态投影得到,KV 只“物化”一次,而不是每层各存一份。 内层:KV Reuse。cross-decoder 每个 hybrid 块内,稀疏注意力层直接复用前邻全注意力层的 KV cache 和 top-k 选择索引。全注意力层本来就要计算全部 attention score,top-k 选择是免费的副产品;稀疏层复用它,同时省掉了 KV 存储和一次独立的稀疏选择计算。 token 级选择取代块级选择。从 HySparse 的 64-token 粒度细化为单 token(1024 个全局 token)。消融显示这对检索类任务收益显著:RULER-v2 +6.6、MRCR-v2 +8.1、GraphWalks +5.5。 强制近期窗口取代独立 SWA 分支。稀疏层不再单独维护一条 SWA 支路,而是把最近 128 个 token 强制并入稀疏选择集,局部与全局 token 共用同一份 KV cache。这是为架构统一付出的有意识取舍,消融中门控 SWA 在 GSM8K 和 MRCR-v2 上略优,但强制窗口换来了下面的关键性质。 由此得到最大的系统红利:prefill 提前退出。既然 cross-decoder 的全部 KV 都源自 self-decoder 隐状态,prefill 只需跑完前 25 层(其中全注意力仅 1 层)即可终止,后 24 层的 prefill 整段跳过。在 prefill/decode 分离部署下,prefill 节点只需承载约一半的层,显存近半减;跨节点传输的是投影后的 KV(1M tokens 仅 2.69 GB) 而非完整隐状态。 还有一个配合性细节:KV 头从 GQA(64 组 4 头)直接压到 MQA(64 组 1 头)。既然 KV 本来就要跨层共享,多 KV 头的收益消失,索性压到底,这也是 KV cache 缩减的重要来源。 关键数据 | 指标(1M tokens, FP8) | HySparse2 | HySparse | Hybrid SWA (MiMo-V2.6) | | Prefill FLOPs | 1×(基准) | 2.92× | 5.02× | | KV cache | 2.69 GB | 6.72 GB | 12.09 GB | Fuli Luo @_LuoFuli MiMo-V3 is getting a new architecture. The core of it, HySparse2, is out today. Less prefill, a smaller KV cache, better long-context retrieval—and we got all three at once. Compared with MiMo-V2.6's Hybrid SWA architecture: • 5.02× lower prefill FLOPs at 1M tokens • 4.5× smaller KV cache at 1M tokens • Better MRCRv2 and RULER-v2 scores, plus lower AgentPPL and LongPPL Why build a new architecture? Agentic inference is a very different workload. Each round, a short action can return a long observation that needs to be prefilled, while the context keeps growing. That puts prefill cost, KV-cache size, and retrieval accuracy on the critical path at the same time. HySparse2 tackles all three with two levels of KV sharing: • KV Bridging: Following YOCO, full-attention layers in the cross-decoder build their K/V from self-decoder hidden states. • KV Reuse: Within each hybrid block, sparse layers reuse the preceding full-attention layer's KV cache and selection indices. Two more changes: token-level selection replaces block-level selection, and a forced window of recent tokens replaces the separate SWA branch, so local and global tokens share one KV cache. Since all cross-decoder KV caches now come from the self-decoder, prefill can stop once the self-decoder finishes. Paper: arxiv.org/pdf/2609.26368 🔗 View Quoted Tweet 💬 0 🔄 0 ❤️ 0 👀 67 ⚡