Large language models (LLMs) are getting better at complex, multi-step reasoning — but the infrastructure cost of letting them “think” deeply is becoming a central constraint. Nvidia’s new Dynamic Memory Sparsification (DMS) technique targets one of the core bottlenecks: the key-value (KV) cache that explodes in size as models generate long chains of thought or explore multiple reasoning paths.
According to Nvidia’s researchers, DMS can compress this KV cache enough to cut reasoning-time memory costs by up to 8x, while preserving — and in some benchmarks even improving — accuracy and reasoning quality. For enterprise teams running math, science, and coding workloads on models like Qwen and Llama, this offers a way to scale inference-time reasoning without a corresponding jump in GPU memory demand.
Why KV Cache Memory Is the Real Bottleneck in Reasoning-Centric LLMs
When LLMs tackle complex problems, they frequently generate “chain-of-thought” tokens — intermediate reasoning steps written out before a final answer. Inference-time scaling techniques embrace this behavior by giving models more budget to think: more tokens, deeper chains, or multiple reasoning paths in parallel.
Every one of those tokens adds entries to the KV cache — the temporary attention memory that stores representations of all prior tokens. This cache grows linearly with context length and branching factor. For long chains or many parallel trajectories, it quickly becomes the dominant consumer of GPU memory.
In production systems, that KV footprint translates directly into economic and operational constraints:
• GPU memory becomes saturated, forcing hosts to spend more time shuttling data than performing compute, increasing latency.
• Throughput suffers because each request holds onto a large slice of VRAM, limiting concurrent users per GPU.
• When memory is overcommitted, systems can thrash or fail, making high-availability deployments fragile.
Nvidia’s Piotr Nawrot describes the trade-off as fundamentally economic, not just technical: whether your existing infrastructure can sustain 100 or 800 reasoning threads for the same hardware cost depends heavily on how efficiently you manage the KV cache.
Existing approaches try to relieve pressure in two main ways, each with clear drawbacks for reasoning workloads:
• Heuristic eviction (e.g., sliding windows) keeps only the most recent tokens and discards older ones. This saves memory but often deletes crucial context, degrading accuracy, especially for tasks needing long-range dependencies.
• Paging/offloading moves portions of the KV cache to slower memory tiers. While it preserves information, it introduces additional latency from constant data movement, which can make real-time and interactive applications sluggish.
For enterprise engineering teams, the result is a familiar dilemma: either cap reasoning depth and parallelism or absorb steep increases in GPU memory and latency. DMS is designed to shift that trade-off.
Dynamic Memory Sparsification: Letting the Model Manage Its Own Memory

Dynamic Memory Sparsification approaches KV compression from inside the model rather than as an external, rule-based cache policy. Instead of applying a fixed heuristic about which tokens to keep, DMS trains the model itself to decide what is essential for future reasoning.
Conceptually, DMS “retrofits” an existing LLM (for example, Llama 3 or Qwen 3) into a self-compressing version:
• The model learns to emit an internal signal — effectively “keep” or “evict” — for each token in the KV cache.
• These signals are trained to preserve the model’s final output distribution, not just approximate token-level importance. In other words, the goal is to keep enough information so that the final answers remain the same.
Crucially, DMS does not require retraining from scratch, which would be prohibitively expensive for large models. Instead, it repurposes neurons within the attention layers to handle memory decisions. This allows teams to start from a standard, pre-trained model and adapt it with a relatively lightweight process.
Nawrot stresses that the policy is learned, not guessed: the system optimizes explicitly for preserving the model’s outputs under aggressive KV compression, rather than relying on a generic notion of recency or token position.
Retrofitting Existing Models: Architecture and Training Process

For practitioners, an obvious question is: how invasive is DMS to existing model architectures and inference stacks?
The DMS retrofit operates at the attention layer level, where KV caches are generated and consumed. Instead of bolting on a new component, Nvidia’s approach reuses existing neurons in these layers to output the keep/evict signals. This design avoids major architectural changes and focuses the training on learning a memory management policy.
The process has several practical properties relevant to enterprise teams:
• Minimal retraining overhead. The researchers report that a pre-trained LLM can be equipped with DMS in about 1,000 training steps — a tiny fraction of the original training budget.
• Frozen weights option. To simplify deployment, the model’s core weights can be frozen during DMS training, making the adaptation similar to a Low-Rank Adaptation (LoRA)-style procedure. This keeps the base model intact while learning only the additional memory control behavior.
• Standard hardware footprint. Nvidia notes that a mainstream enterprise model such as Qwen3-8B can be retrofitted with DMS within hours on a single DGX H100, keeping the barrier low for teams already running similar hardware.
From a deployment perspective, this means you can treat DMS as a compact finetuning stage focused purely on memory efficiency, rather than a ground-up retrain or architectural redesign.
Why ‘Delayed Eviction’ Matters More Than Simple Sparsity
Many sparsification or pruning methods classify tokens as either “important” (keep) or “unimportant” (drop). Applied naively to KV caches, that can be dangerous: a token that appears marginal at one step could still be contributing important information over the next few timesteps as the model integrates context.
DMS addresses this with a mechanism the researchers call delayed eviction:
• Tokens flagged for eviction are not removed immediately.
• Instead, they remain accessible inside a local time window — for example, a few hundred steps — during which the model can still attend to them.
This window gives the model time to “extract” the remaining useful information from those tokens and propagate it into newer representations. Nawrot points out that many tokens are neither fully essential nor completely useless; they carry partial information that can be distilled and then safely discarded.
The redundancy in the KV cache largely lives in this gray area. By keeping borderline tokens available briefly before eviction, DMS lets the model redistribute their information into future tokens, achieving high compression without the sharp quality drop that comes from deleting borderline tokens too early.
From an infrastructure standpoint, delayed eviction is what allows DMS to be aggressive about memory savings while still preserving long-context understanding and reasoning chains.
Benchmark Results: Scaling Reasoning Without Paying the Usual Cost

To test DMS, Nvidia’s researchers integrated it into several reasoning-oriented models, including the Qwen-R1 series (distilled from DeepSeek R1) and Llama 3.2, and evaluated them on challenging benchmarks:
• AIME 24 for advanced math reasoning
• GPQA Diamond for science questions
• LiveCodeBench for coding tasks
The headline result is that DMS shifts the Pareto frontier between cost and performance. On the AIME 24 benchmark, a Qwen-R1 32B model equipped with DMS achieved a score 12 points higher than a standard model constrained to the same memory bandwidth budget. Because the KV cache was compressed, the DMS model could afford to “think” both deeper and wider — longer reasoning chains and broader exploration — under the same hardware limits.
DMS also challenges a common assumption: that compression harms long-context retrieval. In “needle-in-a-haystack” tests, where models must find a specific piece of information in a large document, DMS-enhanced models actually outperformed their uncompressed counterparts. The researchers attribute this to active memory management: by pruning redundant or low-value tokens, the context that remains is cleaner and more focused, making it easier for the model to attend to the truly relevant information.
For infrastructure teams, another key result is throughput. In tests with the Qwen3-8B model, DMS matched the accuracy of the baseline model while delivering up to 5x higher throughput. With a much smaller KV cache, GPUs spend less time fetching and moving memory and more time computing, allowing a single server to serve roughly five times as many queries per second at similar quality.
These results suggest that for reasoning-heavy workloads, DMS doesn’t simply reduce cost; it can directly increase effective model capability under fixed hardware constraints.
Deployment Considerations for Enterprise Inference Stacks
Nvidia has released DMS as part of its open-source KVPress library, with the explicit goal of making it easy to adopt in existing pipelines.
Key deployment-related points from the researchers include:
• Standard software stack. The “minimum viable infrastructure” is standard Hugging Face-style pipelines. No custom CUDA kernels are required, which simplifies integration for teams already standardized on common Python/transformers ecosystems.
• Compatibility with fast attention kernels. The DMS-enabled models are fully compatible with FlashAttention, allowing teams to retain their existing high-performance inference kernels while adding memory sparsification on top.
• No special hardware. DMS-equipped models use standard kernels and can drop into current high-performance inference stacks without custom accelerators or complex software rewrites.
Practically, this means DMS can be introduced as a targeted optimization layer in production systems with minimal architectural disruption. For organizations already navigating constraints like VRAM fragmentation, per-tenant context limits, and GPU scheduling, DMS offers an additional lever to stretch existing capacity further.
Looking Ahead: Memory Management as a First-Class Layer in the AI Stack
The Nvidia team positions DMS as part of a broader shift: treating memory management as an intelligent, learnable layer of the AI stack, rather than a static systems-level concern.
They note that DMS is fully compatible with newer architectures such as Multi-Head Latent Attention (MLA), used in DeepSeek’s models. That compatibility opens the door to compounding gains — combining architectural innovations that reduce attention complexity with learned memory sparsification that trims KV usage in real time.
As enterprises move beyond simple chatbots toward more agentic systems — orchestrating tools, policies, and long-running workflows — inference-time scaling becomes the main cost driver. Those scenarios depend on long chains of thought, branching exploration, and persistent context across tasks, all of which stress the KV cache.
Techniques like DMS provide a way to extend those capabilities sustainably. Rather than simply buying more hardware or shrinking workloads, teams can train models to be more disciplined in how they use memory. Nawrot summarizes the trajectory succinctly: the field has only begun to explore what’s possible in inference-time scaling, and memory-aware methods like DMS are likely to play an increasingly central role.

Hi, I’m Cary Huang — a tech enthusiast based in Canada. I’ve spent years working with complex production systems and open-source software. Through TechBuddies.io, my team and I share practical engineering insights, curate relevant tech news, and recommend useful tools and products to help developers learn and work more effectively.





