arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.03589cs.DCcs.LG
收藏

HACK:通过压缩键值缓存实现分离式LLM推理的同态加速

HACK: Homomorphic Acceleration via Compression of the Key-Value Cache for Disaggregated LLM Inference

University of Virginia(弗吉尼亚大学);VMware Research(威睿研究院);University College London(伦敦大学学院);Harvard University(哈佛大学)

Zeyu Zhang, Haiying Shen, Shay Vargaftik, Ran Ben Basat, Michael Mitzenmacher, Minlan Yu

AI总结:

本文提出HACK方法,通过压缩KV缓存并直接在量化数据上进行同态计算,消除了分离式LLM推理中的解量化开销,显著降低作业完成时间。

摘要:

分离式大语言模型(LLM)推理因其将计算密集型的prefill阶段与内存密集型的decode阶段分离而受到广泛关注,从而避免了prefill-decode之间的干扰并提高了资源利用率。然而,在两个阶段之间传输键值(Key-Value,KV)数据可能成为瓶颈,尤其是对于长提示词。此外,prefill和decode的计算时间开销是优化作业完成时间(Job Completion Time,JCT)的关键,而KV数据大小对于长提示词和长序列可能变得难以承受。现有的KV量化方法可以缓解传输瓶颈并降低内存需求,但它们引入了显著的解量化开销,加剧了计算时间问题。我们提出HACK(Homomorphic Acceleration via Compression of the KV cache),即通过压缩KV缓存实现同态加速,用于分离式LLM推理。HACK消除了繁重的KV解量化步骤,直接在量化后的KV数据上执行计算,以近似并降低昂贵的矩阵乘法步骤的成本。大量基于trace的实验表明,与分离式LLM推理基线相比,HACK将JCT降低了最多70.9%;与最先进的KV量化方法相比,JCT降低了最多52.3%。

英文摘要:

Disaggregated Large Language Model (LLM) inference has gained popularity as it separates the computation-intensive prefill stage from the memory-intensive decode stage, avoiding the prefill-decode interference and improving resource utilization. However, transmitting Key-Value (KV) data between the two stages can be a bottleneck, especially for long prompts. Additionally, the computation time overhead for prefill and decode is key for optimizing Job Completion Time (JCT), and KV data size can become prohibitive for long prompts and sequences. Existing KV quantization methods can alleviate the transmission bottleneck and reduce memory requirements, but they introduce significant dequantization overhead, exacerbating the computation time. We propose Homomorphic Acceleration via Compression of the KV cache (HACK) for disaggregated LLM inference. HACK eliminates the heavy KV dequantization step, and directly performs computations on quantized KV data to approximate and reduce the cost of the expensive matrix-multiplication step. Extensive trace-driven experiments show that HACK reduces JCT by up to 70.9% compared to disaggregated LLM inference baseline and by up to 52.3% compared to state-of-the-art KV quantization methods.

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

↑