Abstract
As Large Language Models (LLMs) scale to massive context windows, the Key-Value (KV) cache has emerged as a primary memory bottleneck. While 4-bit quantization is standard, pushing to 2-bit typically results in significant accuracy degradation. We present Kitty, an algorithm-system co-design that achieves accurate 2-bit KV cache quantization. By identifying and "boosting" a small fraction of sensitive channels to 4-bit precision while maintaining the rest at 2-bit, Kitty reduces memory usage by nearly 8× and increases inference throughput by up to 4.1× with negligible accuracy loss.
Introduction
The KV cache grows linearly with sequence length and batch size, posing a severe challenge for long-context LLM serving. For instance, a LLaMA3-70B model serving 32 requests with long sequences can require over 1.2 TB of memory, exceeding the capacity of high-end GPUs. Existing 2-bit quantization methods often hit a "performance cliff" in complex reasoning tasks. Kitty addresses this through a novel Dynamic Channel-wise Precision Boost strategy and an efficient Dense-Sparse Decomposition system implementation.
Methodology: Dynamic Channel-wise Precision Boost
Kitty is built on the observation that channel sensitivity in the hidden state is non-uniform. A tiny subset of channels consistently exhibits higher magnitudes and contributes disproportionately to the error in attention scores when quantized.
Kitty identifies these "critical channels" using a lightweight magnitude-based heuristic. Channels with larger average magnitudes across tokens are preserved in 4-bit (INT4), while the majority are compressed to 2-bit (INT2). Additionally, "attention sinks" (initial tokens) are kept in full FP16 precision to maintain stability. The paper finds that the Key cache is significantly more sensitive than the Value cache, leading Kitty to focus its boosting strategy primarily on the Key cache.
System Design: Dense-Sparse Decomposition
To make mixed-precision quantization efficient on hardware, Kitty avoids "scattered reads" which are slow on GPUs. It introduces a Dense-Sparse Decomposition that reorganizes the mixed-precision page into two unified 2-bit tensors.
The dense tensor contains the base 2 bits for every channel, while the structured sparse tensor contains the "extra" 2 bits for the boosted channels. This layout allows for efficient vectorized memory access. Specialized Triton kernels handle dequantization and attention computation, ensuring that the overhead of managing two tensors does not negate the memory savings.
Evaluation and Results
The researchers evaluated Kitty using Qwen3 and LLaMA3 models (8B to 70B parameters) across benchmarks including GSM8K (math), HumanEval (code), and GPQA (logic).
- Accuracy Recovery: On Qwen3-8B, standard 2-bit quantization (KIVI) drops the average score from 77.15 to 61.39. Kitty-Pro (25% boost) recovers this to 76.18, nearly matching the FP16 baseline.
- Memory Efficiency: Kitty achieves an ~8× reduction in KV cache memory footprint compared to FP16.
- Throughput: By enabling larger batch sizes, Kitty provides a 2.1× to 4.1× throughput increase over FP16 on NVIDIA A100 GPUs.
- Long Context Stability: Kitty maintains stable accuracy even at 32k-token context lengths, where other 2-bit methods typically fail.
Conclusion
Kitty demonstrates that 2-bit KV cache quantization is viable for high-performance LLM inference when combined with channel-wise precision boosting. The co-design of a sensitivity-aware algorithm and a hardware-friendly tensor decomposition overcomes the traditional trade-off between compression ratio and reasoning accuracy. Future work includes exploring more adaptive channel selection heuristics and further optimizing low-level CUDA implementations.
Summary updated