动态稀疏注意力:访问模式与架构
Dynamic Sparse Attention: Access Patterns and Architecture
AI总结:
本文研究动态稀疏注意力的访问模式问题,提出新的LL缓存预留系统和细粒度LRU淘汰策略,以提升不同架构下的服务效率。
摘要:
动态稀疏注意力(DSA)通过限制计算到缓存的top-k键值(KV)条目来减少每token的注意力带宽,但其token依赖的选取模式引入了系统级挑战:KV工作集碎片化、易变且难以预取,可能导致缓存局部性差和解码吞吐量停滞。我们通过在多个开源backbone上实现轻量级索引器,并在自回归解码中记录每层KV索引,分析了这些影响。我们的分析显示,在服务DSA backbones时存在潜在的大量LL(最后级别)缓存缺失事件,导致低效;我们提出了一种新的LL缓存预留系统,在解码步骤之间保存KV token到LL缓存,并结合细粒度LRU淘汰策略,展示该架构如何在不同backbone上提升服务效率。最后,我们提出未来架构和算法探索的方向,以改进现代推理平台上的DSA服务性能。
英文摘要:
Dynamic sparse attention (DSA) reduces the per-token attention bandwidth by restricting computation to a top-k subset of cached key-value (KV) entries, but its token-dependent selection pattern introduces a system-level challenge: the KV working set is fragmented, volatile, and difficult to prefetch, which can translate into poor cache locality and stalled decode throughput. We study these effects by implementing a lightweight indexer for DSA-style selection on multiple open-source backbones and logging per-layer KV indices during autoregressive decoding. Our analysis shows a gap in serving DSA backbones - a potential for a high volume of blocking LL (last level) cache miss events, causing inefficiency; we propose a novel LL cache reservation system to save KV tokens in the LL cache between decode steps, combined with a token-granularity LRU eviction policy, and show on the data we collected how this architecture can benefit serving with DSA implemented on different backbones. Finally, we propose directions for future architectural and algorithmic exploration to improve serving of DSA on modern inference platforms.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。