MeltKV提出可变位宽打包向量量化的KV cache压缩框架
MeltKV: Memory-Aligned KV Cache Compression via Variable-Bit Packed Vector Quantization for Long-Context LLMs
MeltKV是一个面向长上下文LLM推理的KV cache量化框架,通过内存对齐的可变位宽索引打包,按组为key通道自适应分配位宽,并把索引紧凑存入标准数据类型以消除冗余位。配合按head共享码本,它可将KV表示压缩到sub-4-bit直至1 bit;在困惑度相当的情况下,内存占用比当前最优VQ方法低48.1%,延迟低52.9%。
论文给出可变位宽打包与码本共享的KV cache量化方案,在同等困惑度下把内存占用和延迟分别降低48.1%和52.9%,可作为长上下文推理部署的参考。
arXiv:2611.18652v1 Announce Type: new Abstract: Large Language Models (LLMs) increasingly rely on long contexts, making Key-Value (KV) caches dominate memory usage and inference latency. Existing vector quantization (VQ) methods effectively compress KV caches to sub-4-bit levels but often overlook inefficiencies in memory alignment and decoding speed. This work introduces MeltKV, a memory-latency co-optimized KV cache quantization framework for long-context LLM serving. MeltKV employs a memory-aligned variable-bit index packing scheme that adaptively assigns bit-widths to grouped key channels and compactly stores indices within standard data-types, eliminating redundant bits. Additionally, head-wise codebook sharing reduces the total codebook size while maintaining accuracy. Experiments demonstrate that MeltKV effectively compresses KV representations to sub-4-bit levels down to 1 bit and, at comparable perplexity, achieves 48.1% lower memory usage and 52.9% lower latency than state-of-the-art VQ methods.
来源:arXiv (AI + Vision + Imaging) · arxiv.org