计算机科学 > 分布式、并行与集群计算
[提交于 2026年11月30日]
标题:KVSeal: Serving Long-Context LLMs with Losslessly Compressed KV Caches
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:Long context is what lets an LLM serve real workloads: a single request can carry an entire repository, a document collection, or a long agent trajectory. It also makes the KV Cache, rather than the model weights, the dominant serving cost, because the cache grows linearly with the context and every decode step rereads all of it. Eviction, sparse attention, and low-bit quantization shrink this cost by changing which K/V entries attention sees or what values they carry, so accuracy that holds on short prompts can collapse on the long-context tasks these systems target. Lossless compression can reduce KV storage while preserving every original K/V bit. Prior uses of lossless compression include shrinking static weights and reducing KV transfers between workers. Applying it to resident KV, however, requires the serving system to compress pages online as they fill, manage them independently as requests progress, and keep them accessible to decode attention. We present KVSeal, which makes lossless compression the resident form of the KV Cache. We exploit the strong concentration of BF16 KV exponents to design a lossless page format with fixed-length codes and bounded escape storage. Each compressed page carries its own encoded values and escape records, allowing it to be stored, reconstructed bit for bit, and consumed by attention independently of other pages. A compression-aware page lifecycle manages raw and compressed pages as the cache grows. During decode, attention reads both formats and reconstructs compressed values as it consumes them. KVSeal achieves about $1.3\times$ resident KV compression, up to $1.27\times$ decode attention speedup over FlashAttention-2, and up to $1.19\times$ end-to-end decode speedup over stock vLLM.
提交历史
来自:Hangyu Liang[v1] 2026年11月30日 星期一 05:24:20 UTC (542 KB)