arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2611.02583cs.AI
收藏

BasisKV:用于通信和键路由的值隐变量

BasisKV: Value Latents for Communication and Key Routing

Duke University(杜克大学);Wake Forest University(维克森林大学)

Lixun Zhang, Zishan Shao, Kangning Cui, Yu Liang, Fan Yang, Yiran Chen

AI总结:

BasisKV是面向通信密集型长上下文LLM推理的低秩KV缓存压缩方法,联合优化各GPU注意力划分的低秩因子,复用压缩值缓存辅助键路由,在8-GPU张量并行推理下最高实现1.42倍端到端加速,性能优于现有低秩基线。

摘要:

长上下文大语言模型(LLM)推理日益受到维护不断增长的KV缓存的成本限制。低秩K/V投影提供了一种在最小质量损失下压缩KV缓存的有前景方法,但先前工作大多孤立地优化KV缓存压缩,而分布式推理(尤其是注意力计算在多个GPU间划分的张量并行场景)在很大程度上未被探索。我们得出两点观察:(i)在分布式推理中部署低秩KV缓存压缩时,张量并行通信是一项重要成本;(ii)值压缩可与输出投影关联,使同一低秩值表示既能减小值缓存宽度,又能降低张量并行通信成本。基于这些观察,我们提出BasisKV——一种面向通信密集型长上下文LLM推理的低秩KV缓存压缩方法。BasisKV针对完整注意力输出,联合优化各GPU注意力划分的低秩因子,而非孤立拟合每个划分。压缩后的值缓存还可用于识别应访问哪些键页:它预测路由所需的部分键信息,而键特定残差存储无法从值中恢复的内容。随后仅针对选定页检索原始键以计算精确QK分数。在多个LLM系列和系统设置下,BasisKV相比现有低秩基线实现了更优的质量-效率权衡,在8-GPU张量并行推理下达到最高1.42倍的端到端加速。我们的代码可在该https URL获取。

英文摘要:

Long-context large language model (LLM) inference is increasingly constrained by the cost of maintaining an ever-growing KV-cache. Low-rank K/V projections provide a promising way to compress the KV-cache with minimal quality loss, but prior work has largely optimized KV-cache compression in isolation, leaving distributed inference, especially with tensor parallelism where attention computation is partitioned across multiple GPUs, largely underexplored. We make two observations: (i) tensor-parallel communication is an important cost when deploying low-rank KV-cache compression in distributed inference; and (ii) Value compression can be associated with the output projection, allowing the same low-rank Value representation to reduce both Value-cache width and tensor-parallel communication. Based on these observations, we propose BasisKV, a low-rank KV-cache compression method for communication-intensive, long-context LLM inference. BasisKV jointly optimizes the low-rank factors across per-GPU attention partitions against the complete attention output, rather than fitting each partition in isolation. The compressed Value cache is further reused to help identify which Key pages should be accessed: it predicts part of the Key information needed for routing, while a Key-specific residual stores what cannot be recovered from Value. The original Keys are then retrieved only for the selected pages to compute exact QK scores. Across multiple LLM families and system settings, BasisKV achieves a better quality--efficiency tradeoff than existing low-rank baselines, reaching up to 1.42x end-to-end speedup under 8-GPU tensor-parallel inference. Our code is available at https://github.com/alexz949/BasisKV

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑