DeepSeek V4.1 Flash Deep Dive: The Technical Path to 437x KV Cache Compression

DeepSeek V4.1 Flash achieves 437x KV cache compression through three architectural innovations, clearing the cost barrier for long-context agent deployment.
DeepSeek's V4.1 Flash technical report centers on a core thesis: KV cache, not compute, is the true bottleneck in long-context inference. This 552B-parameter model supporting 1M-token contexts compresses per-token global KV cache to just 890 bytes — one-quarter of its predecessor — through three innovations: a causal encoder-decoder that halves prefill compute, compressed absorption attention that reduces indexing cost from linear to constant via cross-layer KV sharing and fixed-size candidate pools, and bounded replay that replaces costly exact cache reconstruction with a cheap 128-token approximation. Despite one-third the total parameters of larger flagship models, V4.1 Flash matches or exceeds them on several benchmarks. The report candidly acknowledges known limitations and concludes that reducing long-context costs is the essential prerequisite for agents to reach true production scale.
Opening: A 51-Page Report That Gets Straight to the Point
DeepSeek has published a 51-page technical report with a title that makes no attempt to hide its central goal — pushing KV cache compression to its limits. The new model, called V4.1 Flash, packs 552B parameters and supports ultra-long contexts of up to 1 million tokens.
The headline number: each token's global KV cache occupies just 890 bytes — one-quarter of the previous V4 Flash generation. The portion that must be persisted to disk shrinks to just one-eighth. Zoom out further, and the picture becomes even more striking: from V1 to V4.1 Flash, in under three years, per-token cache size has fallen from 389,000 bytes all the way down to 890 bytes — a total compression of 437x.
Behind that number lies a fundamental shift in how DeepSeek understands the true bottleneck of long-context inference. In ultra-long-context scenarios, the constraint is rarely compute — it's the KV cache itself.
KV Cache Basics: Why It's the Core Bottleneck for Long-Context Inference
Every time a large model generates a token, it needs to "look back" at everything that came before. To avoid recomputing from scratch, it stores intermediate results — that's the KV cache. The longer the context, the larger the cache.
The critical issue is that KV cache simultaneously consumes three types of resources: GPU memory, disk storage, and the bandwidth required to move data around. In long-context inference, what actually throttles performance is usually not the GPU's compute capacity but this ever-expanding cache. That's why DeepSeek treats cache compression as a prerequisite for deploying agents at scale.
The report offers a useful framing: cache size is fundamentally determined by three multiplicative dimensions — how small each record can be made, how many tokens are merged into a single record, and whether layers can share the same cache. Nearly all of V4.1's core innovations are answers to that third question.

Three Core Innovations: From Model Architecture to Deployment Engineering
Causal Encoder-Decoder: Cutting Prefill Compute in Half
The first innovation is the "causal encoder-decoder," inspired by a concept from Microsoft. It splits the 40-layer network down the middle: the first 20 layers act as the encoder, and the last 20 as the decoder. The KV values needed by the decoder are projected directly from the encoder's final-layer output, rather than being recomputed independently.
As a result, the prefill phase only needs to run half the layers, and per-token activated parameters drop from 16B to 8B. The charts in the report show that as context length scales from 4K to 1M tokens, decode compute grows by only about one-quarter — an almost flat scaling curve.
Compressed Absorption Attention (2nd Gen): Enabling Cross-Layer KV Sharing
The second innovation assigns each layer one of three modes: full, re-index, or reuse. Full-mode layers compute both KV and indices. Re-index layers reuse KV values but re-score them with their own queries, drawing their own attention patterns. Reuse layers skip indices entirely and copy the previous layer's selections wholesale.
Within one encoder group of six layers, only the first layer operates in full mode — the remaining five all use reuse mode.

But reuse alone isn't enough, since indexing itself still requires scanning the full sequence. V4.1's solution: after the first layer scans and selects 2,048 blocks, these are pooled into a candidate set of 16,000 blocks in total. Subsequent layers search only within this pool rather than scanning the full sequence. This transforms per-query indexing cost from something proportional to context length into a constant. On precision, the primary KV is compressed from 8-bit to 4-bit, while the sliding window portion — more sensitive to precision — retains 8-bit.
Bounded Replay Sliding Window: Solving the Cache Persistence Problem
The third innovation operates at the deployment layer. Sliding-window KV is both expensive and short-lived — it survives only for the duration of a single session, lasting perhaps a few minutes, yet it consumes nearly half of the persisted cache space. Skip storing it and you must recompute it; exact reconstruction is prohibitively expensive.

V4.1's solution: replay only the most recent 128 tokens, accepting a small approximation error. What would otherwise be a "catastrophic" cache miss is converted into a cheap local patch.
Engineering Details of the Efficiency Components
Beyond the three major innovations, the report describes several additional efficiency improvements: staggered mixing coefficients break data dependencies; a single kernel pins activation memory traffic; a 196B-parameter conditional memory module stores n-gram patterns in a hash table and prefetches them from host memory; and a speculative decoding mechanism generates five draft tokens in parallel per forward pass, then determines verification length based on confidence. These improvements collectively shape that near-flat decode compute scaling curve.
Performance: One-Third the Parameters, Competitive with Flagship Models
The full model has 552B parameters, but only 8–16B are activated per token. For comparison, DeepSeek's own VS Pro has 1.6T parameters with 49B activated. The report's claim: one-third the total parameters, one-quarter the activated parameters.
On the SWE software engineering benchmark, V4.1 Flash scores 74.2, edging out a competitor's 74.0. It achieves 90.6 on the terminal benchmark, also leading. On the Tonka Forces evaluation, it scores 3,471 — above DeepSeek's own VS Pro at 3,348.

On the product side, three reasoning intensity levels are available (low, medium, max), corresponding to compute budgets of 50, 75, and 100. Scaling from lowest to highest, the average score across eight reasoning benchmarks rises from 67.1 to 76.3, at the cost of roughly 2.5x more output tokens. The report also notes that most of the gain is captured in the 60–80 range.
Known Limitations and Commercial Deployment Plans
To its credit, the report doesn't shy away from shortcomings. In preliminary multi-agent experiments, given 8 hours, the programming benchmark peaks at only 30.04 (versus 20.39 for single-agent). On the science agent benchmark, it scores just 31.2, well behind a competitor's 51.8. The report also openly acknowledges that indexing can miss relevant tokens, bounded replay is only approximate, and untested edge cases may still cause degradation.
On the commercial side, requests to VS Pro will be routed entirely to V4.1 Flash and billed at a lower price. The report closes with a clear thesis: driving down long-context costs is the prerequisite for deploying agents at true scale.
Closing Thoughts
The significance of V4.1 Flash lies not in topping yet another leaderboard, but in using a systematic engineering approach to crack open what seemed like an iron law — that long context equals high cost. When cache costs fall low enough, agents can make the leap from proof-of-concept to genuine large-scale deployment. That may be the real message this 51-page report is trying to send.
Related articles

Catalyst: A Vision for an Enzyme-Like Testing Framework for AI Agents
A developer shared Catalyst on Reddit, an Enzyme-inspired framework for AI Agents, exploring why agents need observable, testable dev tools and the design philosophy behind them.

The Real Capability of AI Coding Agents: Best Models Complete Only 35% of Feature Development Tasks
The 'Agents on Rails' benchmark finds top AI models complete only 35% of feature development tasks. What this means for coding agents and developer teams.

How to Prevent Duplicate Refunds After an AI Agent Crashes: CellaFlow's Durable Execution Approach
How can AI agents avoid duplicate refunds after a crash without deadlocking workflows? CellaFlow uses durable execution, shared work identity, leases, and fencing to solve safety and liveness in multi-agent systems.