DepthWeave-KV: Token-Adaptive Compression for Long-Context LLMs

Anna Cordoba, Adam Puente Tercero, Nerea Angulo Hijo, Mar Linares Tercero, Julia Barrientos, Ainhoa Miranda, Jesus Olivera· July 8, 2026 View original

Summary

DepthWeave-KV is a token-adaptive KV cache compression method for long-context LLM inference that factorizes key and value states across layers using shared low-rank channel bases and token-specific residuals. It dynamically allocates reconstruction rank based on token importance, achieving near-full-cache quality with significant memory reduction and improved throughput without retraining.

A new token-adaptive cache compression method, DepthWeave-KV, has been developed to tackle the memory and bandwidth constraints of Key-Value (KV) caches in long-context language model inference. Unlike existing methods that apply uniform compression, DepthWeave-KV intelligently factorizes key and value states across adjacent transformer layers using shared low-rank channel bases, while preserving lightweight, token-specific residuals for critical attention behaviors. The system incorporates a token-conditional depth router that dynamically assigns higher reconstruction rank to important tokens, such as those bearing instructions or critical for retrieval. This adaptive approach, combined with calibration-free online error tracking from attention-output probes, allows the compression policy to adjust during generation without requiring retraining of the base model. A fused CUDA implementation further optimizes performance by jointly handling basis lookup, residual dequantization, and attention projection, thereby reducing decode-time memory traffic. Benchmarks across various long-context tasks, including LongBench and Needle-in-a-Haystack, show that DepthWeave-KV achieves near-full-cache task quality with an 8.3x KV memory reduction and improved throughput, reaching 72.8 tokens per second at 64K context.

Why it matters

This method offers a significant leap in making long-context LLMs more efficient and deployable by drastically reducing their memory footprint and improving inference speed, which is crucial for real-world applications requiring extensive context.

How to implement this in your domain

  1. 1Evaluate DepthWeave-KV's memory and throughput benefits for your LLM inference workloads.
  2. 2Integrate the token-adaptive compression method into your LLM serving infrastructure.
  3. 3Customize the token-conditional depth router to prioritize specific types of tokens in your applications.
  4. 4Leverage the fused CUDA implementation for maximum performance gains in production environments.

Who benefits

Cloud ComputingAI DevelopmentSoftwareData Centers

Key takeaways

  • DepthWeave-KV offers token-adaptive KV cache compression for LLMs.
  • It significantly reduces memory usage and improves inference throughput.
  • The method maintains near-full-cache task quality without model retraining.
  • Dynamic allocation of reconstruction rank based on token importance is a key feature.

Original post by Anna Cordoba, Adam Puente Tercero, Nerea Angulo Hijo, Mar Linares Tercero, Julia Barrientos, Ainhoa Miranda, Jesus Olivera

"arXiv:2607.06523v1 Announce Type: new Abstract: Long-context language model inference is increasingly limited by the memory bandwidth and capacity required to store key-value caches, yet existing compression methods often apply uniform budgets across layers or tokens and degrade…"

View on X

Originally posted by Anna Cordoba, Adam Puente Tercero, Nerea Angulo Hijo, Mar Linares Tercero, Julia Barrientos, Ainhoa Miranda, Jesus Olivera on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses