SealKV: Accurate Low-Bit KV Compression for Faster LLM Inference
Yang et al. in Inference & systems
Can a smaller KV cache decode faster?
SealKV: Accurate Low-Bit KV Compression for Faster LLM Inference
Why compress the cache at all?
Attention rereads the growing key-value cache for every generated token; memory bandwidth can limit decode speed, while cache capacity limits concurrency.
Saved memory traffic must outweigh the time spent encoding new entries and reconstructing old ones, while preserving enough quality.
Trellis coding shares bits across vector coordinates

SealKV adapts CPTC. With b=4, T=8, L=16, each window advances four bits, so adjacent windows share 12 bits; tail-biting wraps the end to the start, packing eight values into 32 bits without initial state.
A shorter trellis makes online coding affordable
With vector length and bit budget fixed, Viterbi search work scales as 2^L, making long windows costly as a KV cache grows.
On a unit-variance Gaussian at four-bit payload, L=10 gives 3.79 effective bits, excluding metadata, versus 3.93 at L=16, with 64× less search at matched vector length and bit budget.
Rotation leaves a shared channel mean

RMS combines spread and mean, while standard deviation measures spread around the mean. Panels a-b are before randomized Hadamard rotation and c-d after; across 24 Qwen3-8B AIME-25 traces, the per-layer K/V gap persists.
Subtract the offset when a block seals
- 1
Average each completed block
Each completed 16-token key or value block gets one per-channel mean, shared by its tokens.
- 2
Code only the residual
Subtract the stored rounded mean, scale each rotated token's residual to the codebook, then trellis-code it.
- 3
Restore the mean in attention
Fused attention restores block means directly; dequantized KV values are never written back to HBM.
- 4
No calibration data
The rotation and codebook are model-independent; live means and scales are estimated online, so no calibration data are needed.
Block-local means lower error at the same rate
On Qwen3-8B WikiText-2, causal running K/V means give KL divergence from BF16 of 32.79 × 10⁻³ at 3.125 bits/value.
With CPTC, RHT, sink, window, and BF16 mean precision fixed, block means lower that KL divergence to 19.17 × 10⁻³ at the same rate.
The controlled comparison favors local block statistics over a causal running mean.
Qwen3-14B: accuracy as KV storage shrinks
Qwen3-14B, unweighted six-task mean (%); bits/value includes metadata. KxVy = x-bit keys/y-bit values. SAW-INT4 and NVFP4 tie at 82.06.
64K peak decode throughput on one H100
Qwen3-8B, one H100, 64K, 512 output tokens/request; each engine's best BF16 is 1×. KxVy = x-bit keys/y-bit values.
Where the results have limits
Two-bit quality varies
K2V2 (2-bit keys/values) trails BF16 by 3.81, 2.35, and 0.37 six-task mean points on Qwen3-4B, -8B, and -14B, respectively.
Software lookup ceiling
As memory traffic shrinks, shared-memory table lookups and instruction issue become the bottleneck; fewer bits do not translate proportionally into speed.
Prefill costs time
On one H200, prefill for a single 64K Qwen3-8B K4V4 prompt took 1.27× BF16 time; short generations amortize this cost less.
Why it matters
- Completed blocks make trellis coding practical for a growing KV cache; block means remove shared offsets rotation leaves behind.
- Qwen3's K4V2 (4-bit keys, 2-bit values) at 3.41 bits/value stayed within 0.7 points of BF16's six-task mean; validate K2V2 on your model.
- Can hardware-native trellis decoding remove software lookup overhead so lower bit widths yield larger speedups?
11 slides, 3 min
9 hours ago