提出SplitZip,用超快无损压缩解决大模型服务中KV缓存传输瓶颈。
SplitZip: Ultra Fast Lossless KV Compression for Disaggregated LLM Serving
- 基于浮点数指数冗余,用固定码字和稀疏逃生流高效编码
- 在真实BF16张量上实现613.3 GB/s压缩、2181.8 GB/s解压
- 可直接集成到现有系统,支持长输入与智能体任务
当前大模型服务采用预填充-解码分离架构,以平衡计算与内存负载。预填充阶段生成的KV缓存需传输至解码节点,但跨物理机部署导致传输成为关键瓶颈,尤其在长输入和智能体工作负载下。现有无损压缩方法不适用,因主要面向离线权重压缩、依赖CPU或使用变长编码,压缩速度跟不上预填充产出速率。本文提出SplitZip,一种面向GPU的无损KV缓存压缩方案,能逐位保持张量内容,并无缝集成至现有服务框架而无需修改模型执行。它利用KV激活中浮点数指数的冗余性:对高频指数使用固定长度码字,罕见指数通过(位置, 值)稀疏逃生流处理。校准的前16个指数码本避免在线统计,密集路径与稀疏修正结合使编解码均适合GPU加速。在真实BF16激活张量上,压缩吞吐达613.3 GB/s,解压达2181.8 GB/s,显著优于已有无损压缩器。端到端传输测试显示,BF16 KV缓存传输提速1.32倍,首次请求时间降低1.30倍,请求吞吐提升1.23倍。该方法同样适用于FP8 KV缓存,相比原生E5M2可提升1.14倍压缩率。代码已开源。
原文摘要 · Abstract (English)
Contemporary systems serving large language models (LLMs) have adopted prefill-decode disaggregation to load-balance between the compute-bound prefill phase and the memory-bound decode phase. Under this design, prefill workers generate a KV cache that must be transferred to decode workers before generation can begin. With these workers residing on different physical systems, this transfer becomes a significant bottleneck to serving LLMs at scale, especially for long-input and agentic workloads. Existing lossless codecs are unsuitable here as they primarily target offline weight compression, run on CPUs, or use variable-length coding whose compression cannot keep up with KV production during prefill. We introduce SplitZip, a GPU-friendly lossless compressor for KV cache transfer that preserves KV tensors bitwise and integrates into existing serving frameworks without modifying model execution. SplitZip exploits redundancy in floating-point exponents of KV activations, encoding frequent exponent values with fixed-length codes and routing rare exponents through a sparse escape stream of (position, value). A calibrated top-16 exponent codebook eliminates online histogramming, while the regular dense path and sparse escape correction make both encoding and decoding efficient on GPUs. On real BF16 activation tensors, SplitZip achieves $613.3$ GB/s compression throughput and $2181.8$ GB/s decompression throughput, outperforming prior lossless compressors on the critical codec path. End-to-end transfer experiments show up to $1.32\times$ speedup for BF16 KV cache transfer, $1.30\times$ speedup for TTFT, and $1.23\times$ increase in Request Throughput. The same approach extends to FP8 KV caches, providing up to $1.14\times$ compression over native E5M2. Code is available at https://github.com/Intelligent-Microsystems-Lab/SplitZip
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。