长上下文推理的瓶颈终于有了系统级解法——CLSA通过共享路由索引同时加速预填充、缓存和解码,做LLM推理优化的团队值得看看这个架构思路。
本文提出跨层稀疏注意力(CLSA),一种基于KV共享架构(如YOCO)的新方法。核心创新在于不仅共享KV缓存,还共享路由索引——单个索引器计算一次token级top-k选择,结果跨层复用,既保留了细粒度选择性,又分摊了路由开销。实验显示,在128K上下文下,CLSA实现最高7.6倍解码加速和17.1倍整体吞吐提升,同时保持模型质量。这为长上下文LLM提供了一种兼顾效率与质量的架构方案。
You Only Index Once: Cross-Layer Sparse Attention with Shared Routing
Long-context inference in modern LLMs is increasingly constrained by decoding efficiency, especially in reasoning-heavy settings where models generate long intermediate chains of thought. Existing sparse attention methods often face a practical efficiency-quality trade-off. Structured block sparse methods typically provide stronger acceleration but incur noticeable quality loss, while token sparse methods are usually more accurate yet deliver limited end-to-end speedup because top-k routing over the full cache remains expensive. In this work, we propose cross-layer sparse attention (CLSA), which is built on top of KV-sharing architectures such as YOCO. The core idea is to share not only the KV cache across cross-decoder layers, but also the routing index. A single indexer computes token-level top-k selection once and reuses the resulting index across layers, thereby preserving the fine-grained selectivity of token sparse attention while amortizing the routing overhead. The resulting architecture improves all major inference bottlenecks jointly, including pre-filling, KV-cache storage, and long-context decoding. Experiments across short-context and long-context benchmarks show that CLSA is both accurate and efficient, achieving up to 7.6x decoding speedup and 17.1x overall throughput improvement at 128K context. These results suggest a more complete architectural solution for long-context LLMs that jointly advances model quality and inference efficiency.