SemiAnalysis 指出稀疏注意力只缓解内存带宽瓶颈,无法解决内存容量问题:计算时仍需保留全部上下文 token 并加载进 HBM。HiCache 的思路是将 KV cache 从 HBM 卸载到更大容量、更低带宽的存储层,仅在计算时加载最相关的 token 集合;HiSparse 则进一步引入常规缓存策略,把最相关部分加载进 HBM。
Sparse attention fixes memory bandwidth, not memory capacity.
“The whole idea of HiCache is trying to offload KV cache from the HBM to a lower tier, higher capacity but lower bandwidth memory, and only load the most relevant set of tokens during computation.”
“Sparse attention doesn’t mitigate the memory capacity bottleneck. It’s a technique that helps a lot with memory bandwidth.”
“During the sparse attention computation, you still need to select the tokens. So you still have to keep all the tokens in context, and you cannot discard them. At some point, it still has to be loaded into HBM.”
“That’s where HiSparse becomes useful, because it can apply the typical caching rules so that you could load the most relevant parts into HBM.”
来源:SemiAnalysis · x.com