DeepSeek V4.1-Flash Cuts KV Cache by 437x With New CED and CSA2 Architecture
DeepSeek has launched V4.1-Flash, a model built on CED and CSA2 architectures that cuts KV cache by up to 437 times, reduces runtime VRAM to one quarter and disk-persistent memory to one eighth of the previous generation, while matching or beating its 1.6T V4-Pro flagship on several agent benchmarks.
The architecture combines a Causal-Encoder-Decoder, or CED, design with Compressed Sparse Attention 2, or CSA2, and a low, high or max adjustable reasoning effort control. DeepSeek says the changes target long-context scenarios in which stronger intelligence has usually required more computing power and far higher hardware demands.
CED addresses the prefill stage, which the report identifies as the most expensive part of long-text agent workloads. In agent operations, every tool-call result and every dialogue turn forces the model to read the full context from beginning to end and generate a KV cache. At million-token context lengths, that step alone can occupy an entire GPU. The previous V4-Flash used a hybrid attention architecture that accelerated prefill but did not reduce how much context had to be stored.
V4.1-Flash has 40 neural network layers. CED splits them into two parts. The first 20 layers use a causal encoder to read the full context once and output a highly condensed summary in a hidden state. The next 20 layers do not reread the context; they generate the global KV cache they need from the encoder summary through a projection matrix. The report says this halves prefill compute and reduces persistent cache cost on server disks to one eighth of the previous generation. For API users, the report says a deep complex task that previously cost 10 yuan in compute can now cost 1 to 2 yuan.
CED is paired with sliding window attention, or SWA, for nearby content that must remain precise, such as freshly generated code. Because local memories cannot be reused directly from the encoder summary, DeepSeek also designed a limited replay mechanism. It selects a very small number of tokens and uses approximate values to reconstruct short-term memory at low cost.
CSA2 tackles storage. The previous V4-Flash used a CSA plus HCA hybrid architecture in which each layer kept a full KV cache and index, meaning a 40-layer network could store 40 copies of the same context and cause memory pressure. V4.1-Flash uses CSA2 to enable cross-layer KV reuse and cross-layer Top-K index reuse, allowing all 40 layers to share one copy. The report says CSA2 removes duplicate compression zones, discards cumbersome absolute-position algorithms, and simplifies intermediate steps. It also avoids a separate hidden-state compression path and directly converts core memory for use.
CSA2 assigns each layer one of three static operating modes. Full mode reads the entire context, generates complete KV and index data, and selects Top-K entries. Reindex mode does not store its own large cache; it takes the complete KV cache from Full mode and re-filters important items. Reuse mode skips complex index calculation entirely. Only a small number of layers run in Full mode, sharply reducing duplicate storage and index computation. For very long contexts, a hierarchical sparse indexer further optimizes the process: Full mode builds a condensed index pool, and later layers perform secondary retrieval and scoring within that smaller pool.
V4.1-Flash also uses FP4 quantization to reduce the size of each KV entry. Long-term core memory in the main KV cache is compressed to FP4, while short-term local details in the SWA-KV cache remain at higher FP8 precision. DeepSeek introduced quantization-aware training so the model can work accurately with fuzzy long-term memory. At runtime, the chip restores the values for computation with what the report describes as nearly imperceptible precision loss. CSA2 with FP4 reduces global per-token KV volume to one quarter of V4-Flash, and CED plus SWA limited replay brings the final persistent KV cache on disk to one eighth of the previous generation. The report says half of the savings come from discarding short-term detail memory after use, and half from architecture and quantization of global long-term memory.
The model has 552 billion main parameters and a 196 billion Engram memory module. During prefill it activates only 8 billion parameters, and during decoding it activates 16 billion. At that activation scale, the report says V4.1-Flash matches the previous 1.6-trillion-parameter V4-Pro flagship on core knowledge, reasoning and coding, and surpasses it in some internal held-out evaluations. On the public Agent benchmark DeepSWE v1.1, which measures code agents on real engineering problems, V4.1-Flash reached a 74.2 percent pass rate, ahead of Opus-5.0 and GPT-5.6-Sol. On CyberGym, a cybersecurity agent test set, it achieved a state-of-the-art result in the open-source ecosystem.
The report also says that with CED and CSA2, context length can rise from 4,000 to 1 million tokens while decode compute increases by only about 25 percent. That combination reduces pressure on VRAM, storage and bandwidth, the three major costs for enterprises running long-context agents.
The report notes a related macro idea in a recent paper by Tang Jie's team, Trace as State: Reasoning Traces as Conditional States for Long-Context Transformers. Both approaches seek to avoid fully replaying all context at every layer, using summary condensation and on-demand retrieval to ease long-context pressure. Their implementation paths differ: V4.1-Flash rewrites the underlying network architecture, while Trace as State is an external inference-stage algorithm that does not change model weights. If the CED and CSA2 framework is widely adopted, the report says, next-generation flagship models may move away from a unified dense Transformer design toward combinations of sparse mechanisms, cross-layer reuse and controllable approximation strategies.
Editor's Summary
DeepSeek's V4.1-Flash introduces CED and CSA2 to cut KV cache and memory costs for long-context agents. The model activates 8 billion parameters during prefill and 16 billion during decoding, yet matches or surpasses the previous 1.6-trillion-parameter V4-Pro on several benchmarks. The architecture points to a future in which sparse mechanisms, cross-layer reuse and controllable approximation matter more than dense parameter scaling alone.