DeepSeek compresses its agents' memory without shortening their context

DeepSeek launches V4.1-Flash, a one-million-token multimodal model that sharply reduces the KV cache and will soon replace V4-Pro in its API.

Reading a long history consumes memory before a model even begins responding. DeepSeek is targeting that expense directly with V4.1-Flash, a new architecture that does not activate the same amount of compute while processing input and generating output.

Announced on September 10, 2026, DeepSeek-V4.1-Flash accepts text and images, generates text, and supports a context window of up to one million tokens. It is now the model served under the `deepseek-flash` identifier in the company’s API.

DeepSeek describes it as the smallest member of a new family. That description is relative. The backbone contains 552 billion parameters, while the Hugging Face listing counts 763 billion parameters across the full checkpoint. The files take up roughly 510 GB. Here, Flash refers to lower compute requirements per token, not a compact model designed to run on a laptop.

The difference starts with its Mixture-of-Experts architecture. The backbone’s 552 billion parameters do not all operate during every pass. The model activates only 8 billion parameters per token while processing input, then 16 billion during generation. By comparison, DeepSeek-V4-Flash activated 13 billion parameters in both phases, while V4-Pro activated 49 billion.

The technical report describes a 40-layer Transformer divided into two 20-layer blocks. The first acts as a causal encoder responsible for the prompt. The second generates the response. Instead of recalculating the information required for global attention in every upper layer, the decoder projects it from the encoder’s final state.

This structure targets agents, whose requests are often dominated by input. A codebase, a long conversation history, successive tool outputs, and persistent instructions may be reread at every step, while the response added during the current turn remains short. Reducing the cost of this reading phase can therefore matter more than accelerating text generation alone.

The gain does not amount to removing half the network. The decoder layers retain local attention over a sliding window, and some operations remain necessary during prefill. DeepSeek nevertheless estimates that its Causal Encoder-Decoder nearly halves the compute used for input, although it has not published an independent measurement of the actual time saved through its API.

The second area of savings is the KV cache. This memory stores representations that have already been computed so the model does not have to process the entire context again for every new token. Its size becomes critical with a one-million-token window and many simultaneous requests, because it occupies accelerator HBM before being moved to host memory or storage when a prefix must remain available for reuse.

Compressed Sparse Attention 2, or CSA2, shares part of this cache across several layers. Some layers calculate the keys, values, and positions considered relevant. Others only reevaluate the selection or reuse previous results directly. A hierarchical index also reduces the number of positions examined by deeper layers.

DeepSeek stores the main portion of the global cache in FP4. The report puts its footprint at 890 bytes per token, down from 3,514 bytes for V4-Flash, or nearly four times less. This figure does not describe the weight size or the total memory required for a request. It only covers the global KV cache, alongside which local attention, activations, and other service resources are still required.

The company claims an even larger reduction for the persistent cache stored on SSD or in host memory to support prefix reuse. V4.1-Flash no longer stores local-attention states there. It keeps them in system memory for a few minutes and, once they are gone, recomputes only the most recent 128 tokens.

This mechanism, called SWA Bounded Replay, reduces the persistent cache footprint to about one-eighth that of V4-Flash at the same sequence length. The reconstruction is approximate. The report acknowledges that the same suffix can produce slightly different states depending on where the cache resumes, and that the method’s edge cases have not yet been fully characterized.

The headline figure of 552 billion parameters does not cover every component in the system either. DeepSeek adds 196 billion Engram parameters divided between two conditional-memory modules. They store associations between groups of tokens in large tables accessed through hashing. Deterministic addressing lets the system preload them from host memory instead of passing the entire memory through the network for every token.

A module called DSpark accelerates speculative generation. Three blocks prepare up to five positions, after which a confidence mechanism determines how many proposals to verify based on server load. DeepSeek also describes fused kernels and a separation between the resources used for vision, prompt processing, and generation.

These components help explain the promise of higher throughput, but the report does not provide token-per-second figures, time-to-first-token measurements, or latency comparisons conducted on identical hardware. “Faster” therefore remains a vendor claim at launch. The architecture reduces measurable operations and memory usage, but that alone does not establish the speed each customer will experience.

V4.1-Flash also brings vision into the main model. A DeepSeek-ViT encoder converts each image into visual representations, which a projector inserts into the same sequence as the text. The encoder was trained separately before multimodal data was incorporated from the beginning of the language model’s pretraining.

The model accepts images at different resolutions and scales them to a range of approximately 544 × 544 to 1,344 × 1,344 before processing. A rearrangement operation then reduces the number of visual tokens by a factor of nine. In this case, “native multimodal” means text and vision were learned together inside the backbone, not that the system operates without a specialized encoder.

Images can be sent to