Benchmarking KV-Cache Optimizations across Task Quality and System Performance for Long-Context Serving

· Source: cs.CL updates on arXiv.org · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering · Depth: Expert, extended

Summary

This paper introduces a comprehensive, workload-aware benchmark for KV-cache optimization techniques in large language model (LLM) serving, addressing the challenge of comparing disparate evaluations. It assesses representative methods like KIVI, TurboQuant (quantization), SnapKV (pruning), and CaM (merging) on Llama-3.1-8B-Instruct and Mistral-7B-Instruct-v0.3. The evaluation spans LongBench-style multi-document QA, single-document QA, few-shot learning, and summarization, measuring task quality, output throughput, time-to-first-token (TTFT), and compression ratio. Key findings indicate that compression ratio alone poorly predicts performance. KIVI4 offers the most stable quality, SnapKV achieves the highest long-context throughput, and CaM provides significant gains on specific QA tasks but shows high workload sensitivity. Summarization is particularly vulnerable to KV cache modifications, while few-shot learning is robust. Most optimizations minimally affect TTFT, except TurboQuant.

Key takeaway

For MLOps Engineers deploying LLMs with long-context workloads, you should prioritize workload-aware KV-cache optimization. If your application requires stable quality across diverse tasks, consider KIVI4. For maximum long-context throughput, SnapKV is your best option. Be cautious with methods like CaM for general-purpose LLMs due to its unpredictable compression and quality sensitivity, especially for summarization tasks where aggressive compression can significantly degrade output.

Key insights

KV-cache optimization effectiveness is workload-dependent, with stable quantization balancing quality and performance.

Principles

Method

The benchmark evaluates quantization (KIVI, TurboQuant), pruning (SnapKV), and merging (CaM) on LLMs using LongBench tasks, measuring quality, throughput, TTFT, and compression.

In practice

Topics

Code references

Best for: Research Scientist, AI Engineer, NLP Engineer, AI Scientist, Machine Learning Engineer, MLOps Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by cs.CL updates on arXiv.org.