arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.04107cs.LGcs.DC
收藏

FDC:面向高效 LLM 推理的快速 KV 维度压缩

FDC: Fast KV Dimensionality Compression for Efficient LLM Inference

University of Virginia(弗吉尼亚大学)

Zeyu Zhang, Haiying Shen

AI总结:

本文提出快速 KV 维度压缩系统 FDC,通过免解压、自适应压缩率和优化注意力内核,在保持 99% 精度的同时显著降低 LLM 推理延迟并提升吞吐。

摘要:

在大型语言模型中,Key-Value Cache(KVC,键值缓存)的内存限制在推理期间构成挑战。本文提出 FDC,这是一种快速 KV 维度压缩系统,可消除现有 KV 维度压缩系统 Palu 所产生的解压开销,并减少注意力时间。此外,FDC 采用自适应压缩,根据各注意力头和层对推理的贡献定制其 KV 压缩率,从而在满足精度损失约束的同时最大化整体压缩。另外,FDC 增强了注意力内核,以平衡自适应压缩方法导致的不均匀工作负载,进一步降低注意力计算延迟。综合实验表明,与 Palu 相比,FDC 可将 Job Completion Time(JCT,作业完成时间)最多降低 64%,并在相同延迟下提供最高 1.97 倍的吞吐量,同时保持无压缩时 99% 的精度。当最先进的驱逐和量化方法与 FDC 结合时,它们表现出与结合 Palu 时相近的改进。我们已开源代码。

英文摘要:

In large-language models, memory constraints in the Key-Value Cache (KVC) pose a challenge during inference. In this work, we propose FDC, a fast KV dimensionality compression system that eliminates the decompression overhead incurred in the existing KV dimensionality compression system, Palu, and reduces attention time. Moreover, FDC employs adaptive compression, tailoring KV compression rates across heads and layers based on their contributions to inference to maximize overall compression while maintaining an accuracy loss constraint. Additionally, FDC enhances the attention kernel to balance the uneven workloads caused by the adaptive compression approach to further reduce attention computation latency. Comprehensive experiments demonstrate that compared to Palu, FDC can reduce Job Completion Time (JCT) by up to 64%, and delivers up to 1.97X throughput under the same latency, while maintaining 99% of the accuracy without compression. When state-of-the-art eviction and quantization methods are combined with FDC, they exhibit similar improvements compared to those combined with Palu. We open-sourced the code.

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

↑