HACK: Homomorphic Acceleration via Compression of the Key-Value Cache for Disaggregated LLM Inference
Abstract
Disaggregated Large Language Model (LLM) inference has gained popularity by decoupling the compute-intensive prefill stage from the memory-intensive decode stage, enabling the use of low-end, compute-focused GPUs for prefill and high-end, memory-rich GPUs for decode. This separation reduces cost while maintaining high throughput. However, transmitting Key-Value (KV) data between the two stages can induce high overhead, 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 alleviate transmission and memory overhead by storing KV in low-bit formats, but attention still runs on dequantized BF16 KV in every iteration, incurring substantial recurring dequantization overhead and offering no reduction in attention compute. We propose Homomorphic Acceleration via Compression of the Key-Value cache (HACK) for disaggregated LLM inference. HACK keeps KV in a highly compressed INT2 form for transmission and caching, and it computes attention directly on the quantized KV. A lightweight approximation in the epilogue replaces per-iteration dequantization. HACK thereby reduces KV transmission, decode-time memory access, and attention computation together. Extensive trace-driven experiments show that HACK reduces average JCT by up to 70.9% compared to the disaggregated LLM inference baseline and by up to 53.5% compared to state-of-the-art KV quantization methods.