FreqDepthKV: Frequency-Guided Depth Sharing for Robust KV Cache Compression in Long-Context LLM Inference

· Source: Artificial Intelligence · Field: Technology & Digital — Artificial Intelligence & Machine Learning · Depth: Expert, quick

Summary

FreqDepthKV is an inference-time cache compression method designed to address the memory and bandwidth limitations of KV caches in long-context Large Language Models. It factorizes adjacent-layer KV states into shared low-frequency depth components and sparse high-frequency residuals. A lightweight online probe adaptively assigns attention heads to shared-depth, residual-depth, or exact cache modes based on their contribution to reconstruction-sensitive attention logits, allowing the compression policy to adapt without retraining. This approach preserves task accuracy across long-context question answering, needle retrieval, summarization, and code generation benchmarks. FreqDepthKV achieves a 3.9x effective compression ratio, reducing peak KV memory to 6.2 GB, improving decoding throughput to 70.4 tokens/s, and lowering TTFT to 2.06 seconds with a 32k-token prefill window.

Key takeaway

For Machine Learning Engineers and AI Scientists struggling with KV cache memory and bandwidth constraints in long-context LLMs, FreqDepthKV offers a compelling solution. You should consider implementing this method to achieve a 3.9x effective compression ratio and significantly boost decoding throughput to 70.4 tokens/s, while preserving critical task accuracy across diverse benchmarks. This can lead to more efficient and cost-effective deployment of large models.

Key insights

FreqDepthKV robustly compresses KV caches in long-context LLMs via frequency-guided depth sharing and adaptive attention head assignment.

Principles

Method

FreqDepthKV factorizes adjacent-layer KV states into shared low-frequency depth components and sparse high-frequency residuals. An online probe assigns attention heads to shared-depth, residual-depth, or exact cache modes based on attention logits.

In practice

Topics

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

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Artificial Intelligence.