HACK: Homomorphic Acceleration via Compression of the Key-Value Cache for Disaggregated LLM Inference
Zeyu Zhang, Haiying Shen, Shay Vargaftik, Ran Ben Basat, Michael Mitzenmacher, Minlan Yu
TL;DR
This work tackles the KV data transfer bottleneck in disaggregated LLM inference by introducing HACK, a homomorphic quantization approach that performs matrix multiplications directly on quantized KV data, removing the costly KV dequantization step. By partitioning and asymmetrically quantizing KV components and integrating with FlashAttention-2 on vLLM, HACK achieves substantial end-to-end speedups (up to 70.9% JCT reduction) while maintaining accuracy within a few percent across multiple models and long sequences. The method reduces KV transmission and memory access overhead, accelerates both prefill and decode stages through quantized matrix multiplication, and demonstrates scalability across GPU configurations and datasets. Overall, HACK offers a practical, hardware-conscious solution to accelerate disaggregated LLM inference on commodity GPUs and networks, with open-source release for broader adoption.
Abstract
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.
