NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

TriAxialKV: Toward Extreme Low-Precision KV-Cache Quantization for Agentic Inference Tasks

Hanzhang Shen, Haoran Wu, Yiren Zhao, Robert D. MullinsNeurIPS 2026

TL;DR

When AI agents browse the web or operate your computer, their working memory—the KV cache—explodes in size, creating a massive GPU memory bottleneck. TriAxialKV shrinks this memory footprint by up to 4.5× without sacrificing accuracy, simply by recognizing that an old screenshot doesn't need the same numerical precision as a strict API tool definition. By smartly mixing ultra-low 2-bit and 4-bit precision across three dimensions of context, it boosts end-to-end serving speeds by up to 52%.

What Problem Does This Paper Address?

Modern Large Language Models (LLMs) are graduating from casual chatbots into autonomous agents that plan, call APIs, read terminal outputs, and inspect screenshots across dozens of turns. To avoid recomputing the entire conversation history at every step, LLMs store past token representations in GPU memory—a structure called the Key-Value (KV) cache.

In long, multi-turn agentic tasks, this cache balloons rapidly. A single 100,000-token context on a 32-billion-parameter model eats up ~24 GiB of GPU memory at standard 16-bit (BF16) precision, starving the GPU of space to run multiple requests in parallel.

To shrink the cache, researchers use quantization—storing numbers with fewer bits (like 4-bit or 2-bit integers instead of 16-bit floats). However, aggressive 2-bit quantization usually breaks agents. Previous methods either compress all tokens uniformly or adapt along just a single axis (e.g., compressing older turns more than recent ones, or images differently than text). They miss the rich, multi-dimensional structure of agentic workflows, where two tokens from the same turn can have wildly different sensitivities to compression.

Figure 1: Comparison of single-axis KV-cache compression methods, including PM-KVQ [26] for temporal compression and VL-Cache [40] for modality-aware compression, with TriAxialKV, which holistically compresses the KV cache by jointly considering temporal, modal, and semantic axes.

Methods

The authors introduce TriAxialKV, an end-to-end mixed-precision quantization framework integrated into the SGLang serving engine. Instead of treating the context as a flat stream of tokens, it classifies every prefill token along three complementary axes—a triaxial tag:

  1. Temporal recency: How old is the token? (Current turn, 1 turn ago, 2 turns ago, or older).
  2. Modality: Is it text or an image token?
  3. Semantic role: What job does it do? (System instructions/tool schemas, user query, chain-of-thought reasoning, tool calls, observations, or delimiters).

Crucially, tagging requires zero neural network overhead; a lightweight CPU scanner parses the chat template's special tokens in a single pass before inference begins.

Figure 3: Overview of our TriAxialKV compression flow. During prefill, KV entries are quantized and stored in INT2/INT4 pools based on the bit-width assigned to the token’s triaxial tag.

The system operates in two phases:

  • Offline Calibration: Using a tiny (5%) sample of workload data, the system compresses one triaxial tag group at a time and measures how much the attention output distorts compared to 16-bit precision. Using these sensitivity scores and a target memory budget, an optimizer solves for the best assignment of either INT2 (2-bit) or INT4 (4-bit) precision for each tag combination.
  • Online Serving: Incoming tokens are routed into separate paged INT2 and INT4 memory pools that share a single virtual address space. During generation (decode), newly generated tokens default to INT4, and a custom fused Triton kernel performs attention with on-the-fly dequantization—partitioning page tables so INT2 tokens are processed first, avoiding messy branching on the GPU.

Datasets

The authors evaluate TriAxialKV on three existing agentic benchmarks (using 5% of data for calibration and the rest for testing; no new datasets were introduced):

  • BFCL Memory (Berkeley Function Calling Leaderboard): Text-only, multi-turn function calling with strict, structured tool schemas.
  • OSWorld: Multimodal computer-use trajectories where agents navigate real operating systems using screenshots.
  • Claw-Eval: A multimodal agentic benchmark used for axis ablation studies.

Key Insights and Ideas

  • KV error $\neq$ Attention error: A large quantization error on a token nobody attends to is harmless, while a tiny error on a heavily attended token can derail generation. Measuring distortion at the attention output rather than raw KV reconstruction is key to surviving 2-bit compression.
  • Images are massive budget-savers: In computer-use tasks (OSWorld), screenshots account for 84% of all input tokens, yet they tolerate 2-bit compression relatively well. Squeezing images into INT2 frees up massive memory budget to keep fragile text tokens at INT4.
  • Verbatim recall hates uniform 2-bit compression: Uniform 2-bit baselines fail on function-calling tasks because they crush system instructions and tool schemas (inst tags) into 2 bits. Because the model must copy function and argument names verbatim, noise here causes immediate syntax failures. Keeping inst tags at INT4 rescues accuracy.
  • The "most important" axis shifts by task: Dropping the semantic axis hurts function-calling accuracy 3–4× more than dropping the temporal axis. Conversely, on Claw-Eval, temporal recency matters most. You need all three axes to generalize across agentic workloads.
Figure 2: INT2 quantization sensitivity of 32-token same-tag groups along each tag axis. Each group’s KV is quantized to INT2 alone, with all other KV entries kept in BF16.

Key Results

  • Near-Lossless Accuracy: With 70–75% of prefill tokens at INT2 on BFCL Memory, TriAxialKV stays within 2.0% of full BF16 accuracy across four models (Falcon3-10B, Qwen3-14B/32B/235B), whereas 2-bit KIVI and SGLang FP4 drop up to 6.0% and 4.7%. On OSWorld, with 85% of tokens at INT2, it matches BF16 accuracy across all tested vision-language models.
  • Massive Capacity & Speedups: Running Qwen3-VL-32B on OSWorld trajectories, TriAxialKV expands KV-cache capacity by 4.51× (supporting 3.4–4.0× more concurrent requests). This translates to 1.32× higher end-to-end throughput on an NVIDIA B200 GPU (10,274 vs. 7,787 tokens/s) and 1.52× on an H100 GPU.

Limitations and Future Work

While the authors do not include a dedicated limitations section, several constraints and natural extensions emerge from their design:

  • Workload-Specific Calibration: The optimal bit-width budget varies by model and task, requiring an offline calibration sweep (on 5% of target traces) for each new deployment scenario rather than offering a zero-shot universal profile.
  • Chat-Template Dependency: Because the triaxial tagger relies strictly on chat-template delimiters (<think>, <tool_call>, role markers), unstructured agentic prompts without clear special-token boundaries cannot be automatically segmented.
  • Complementary Compression: As noted in the related work, TriAxialKV only reduces bit precision; combining triaxial quantization with token eviction (dropping unimportant tokens entirely) remains an open, complementary avenue for even more extreme compression.

Summary updated

BibTeX
@inproceedings{shen2026triaxialkv,
  author = {Hanzhang Shen and Haoran Wu and Yiren Zhao and Robert D. Mullins},
  title = {{TriAxialKV: Toward Extreme Low-Precision KV-Cache Quantization for Agentic Inference Tasks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=0PStm4OPPJ},
}
Figure