DeepSeek V4.1 Flash Specs: KV Cache Compression Explained DeepSeek AI's model card for DeepSeek V4.1 Flash reports a global KV cache footprint of roughly 890 bytes per token, about a quarter of the 4x-larger footprint of predecessor DeepSeek V4 Flash and a 437x reduction versus the original DeepSeek V1. The 552-billion-parameter multimodal Mixture-of-Experts model uses a Causal Encoder-Decoder architecture that activates only 8B parameters per token during prefill and 16B during decode, with Compressed Sparse Attention 2 (CSA2) and FP4 E2M1 KV caching layered on top. DeepSeek V4.1 Flash ships under the MIT license with a Rust-based deepseek-recipe toolkit and a tunable reasoning effort parameter from 1 to 100, and the model card shows it competitive with or ahead of frontier peers on Terminal-Bench 2.1, DeepSWE v1.1, and CyberGym while trailing on some raw knowledge and long-context benchmarks. DeepSeek V4.1 Flash Specs: KV Cache Compression Explained DeepSeek V4.1 Flash's model card breaks down its 552B MoE design, 1M context window, and 890-byte KV cache per token in detail. What is DeepSeek V4.1 Flash? DeepSeek V4.1 Flash is a multimodal Mixture-of-Experts model from DeepSeek AI with 552 billion backbone parameters, support for context windows up to one million tokens, and native handling of both images and text. Its defining feature isn’t raw scale, it’s how little memory it needs to hold onto during inference. According to the official model card, the model cuts its global KV cache footprint to roughly 890 bytes per token, about a quarter of what its predecessor, DeepSeek V4 Flash, required. TL;DR - DeepSeek V4.1 Flash uses a Causal Encoder-Decoder architecture that activates only 8B parameters per token during prefill and 16B during decode, despite a 552B parameter backbone. - KV cache compression is the headline feature: the model card reports an 890-byte-per-token footprint, described as a roughly 4x reduction versus DeepSeek V4 Flash and a 437x reduction versus the original DeepSeek V1. - Compressed Sparse Attention 2 CSA2 assigns each attention layer a static mode Full, Reindex, or Reuse to share KV data and reuse sparse-attention indices across layers instead of recomputing them. - FP4 KV caching using the E2M1 format with per-16-channel scaling factors is layered on top of CSA2 to further shrink memory use without a separate quantization pass. - Benchmark results show the model competitive with or ahead of frontier peers on several agentic coding and tool-use tasks, including Terminal-Bench 2.1, DeepSWE v1.1, and CyberGym, while trailing on some raw knowledge and long-context benchmarks. - A tunable reasoning effort parameter 1 to 100 lets developers trade inference cost for accuracy on a sliding scale rather than picking between fixed model tiers. - The model ships under the MIT license with a Rust-based toolkit deepseek-recipe for prompt encoding, and no Jinja chat template is included by default. Remy is new. The platform isn't. Remy is the latest expression of years of platform work. Not a hastily wrapped LLM. How does the Causal Encoder-Decoder architecture work? DeepSeek V4.1 Flash splits its 40 Transformer layers into two 20-layer halves: a causal encoder and a decoder. In most Transformer decoders, every layer computes and stores its own key-value KV states, and that KV cache grows linearly with sequence length and layer count. This new architecture changes that relationship. Instead of each decoder layer deriving its own KV cache from its own hidden states, the decoder’s global KV cache is projected once from the final hidden states produced by the encoder. That single projection is then reused across the decoder’s layers. This is why the model can carry 552 billion total parameters but only activate 8 billion during the prefill stage processing the input prompt and 16 billion during decode generating tokens one at a time . For agentic workloads, where prompts are often long tool outputs, file contents, multi-turn context and generation is comparatively short, that asymmetry directly cuts compute cost on the expensive side of the ledger. A companion technique called SWA Bounded Replay handles sliding window attention SWA , a method some layers use to only attend to a limited recent window of tokens rather than the full context. Normally, supporting SWA alongside a persistent KV cache means writing SWA states to disk so they can be recovered later. DeepSeek’s approach instead replays just the most recent window of tokens to reconstruct what’s needed, skipping the SSD round-trip entirely. The model card credits this alone with cutting the persistent KV cache to about one-eighth the size seen in DeepSeek V4 Flash. What is Compressed Sparse Attention 2 CSA2 ? CSA2 is the second generation of DeepSeek’s sparse attention scheme, and it’s the mechanism most directly responsible for the model’s cache efficiency claims. Every attention layer is assigned one of three static modes: - Full mode computes attention normally and establishes the reference KV and indexer data other layers will draw from. - Reindex mode reuses the main KV and indexer keys from a Full layer but recalculates its own Top-K sparse attention indices. - Reuse mode goes further, reusing both the KV data and the previously computed Top-K indices outright. This tiered sharing means the model doesn’t need every layer to independently store and index its own KV cache, which is where most of the memory savings come from. On top of this, a Hierarchical Sparse Indexer restricts deeper indexing layers to a candidate pool already narrowed down by the first Full Mode layer. That keeps the cost of indexing in later layers from scaling with total context length, which matters a lot at the one-million-token context ceiling this model supports. The final piece is quantization: main KV values are stored in FP4 using the E2M1 format, with one E4M3 scaling factor applied per 16 channels. Combined, CSA2 and FP4 caching bring the footprint down to the reported 890 bytes per token, a number DeepSeek positions as roughly a quarter of DeepSeek V4 Flash’s cache size and, over four generations, a 437-fold reduction relative to DeepSeek V1. Other agents start typing. Remy starts asking. Scoping, trade-offs, edge cases — the real work. Before a line of code. What other architectural components does it use? Beyond the encoder-decoder split and CSA2, the model card lists several supporting systems: - Single-Pass mHC , a revised way of mixing the residual stream, run through what the card calls an efficient Mega-mHC kernel. - Engram conditional memory , a 196-billion-parameter memory component that’s sparsely accessed via token-based lookup rather than loaded in full for every forward pass. - DSpark speculative decoding , which generates draft tokens semi-autoregressively and verifies them with a confidence-scheduled process, a common technique for speeding up generation without sacrificing output quality. - A Mixture-of-Experts routing setup with 1 shared expert and 384 routed experts per MoE layer, of which 6 are activated per token. For multimodal input, a vision encoder called DeepSeek-ViT trained from scratch, using 2D rotary position embeddings and 3x3 pixel-unshuffle downsampling feeds into a two-layer MLP projector that converts images into embeddings processed alongside text from the start of pretraining, rather than bolted on afterward. How was it trained? DeepSeek V4.1 Flash was pretrained from scratch on a multimodal corpus of 45 trillion tokens. Sparse attention was trained at a 64K sequence length, with context extended out to the full 1 million token window using an additional 34 trillion tokens. Post-training follows a fairly standard SFT supervised fine-tuning to reinforcement learning to on-policy distillation pipeline, with no changes to the underlying algorithms. The model card is explicit that the gains came from the data side: large-scale automated generation of agent tasks and environments, scaled progressively across data volume, task variety, and rollout count. This lines up with the model’s strong showing on agentic benchmarks relative to more knowledge-focused ones. One notable post-training feature is a continuously controllable reasoning effort setting, an integer from 1 to 100 that trades inference cost for accuracy. Rather than choosing between separate “fast” and “thinking” model variants, developers can dial this parameter to match latency and cost requirements for a given task. How does it perform on benchmarks? On base model evaluations, DeepSeek V4.1 Flash Base often lands close to or ahead of the larger DeepSeek V4 Pro Base despite using far fewer activated parameters, scoring higher on MMLU-Pro 74.1 vs 73.5 , HumanEval 79.4 vs 76.8 , and GSM8K 93.0 vs 92.6 , while trailing on tasks like SimpleQA-Verified and MultiLoKo. At maximum reasoning effort, the instruct model is competitive with frontier peers referenced in the card labeled Opus-5.0, GPT-5.6 Sol, K3, and GLM-5.3 on several agentic and coding benchmarks. It leads on Terminal-Bench 2.1 90.6 , DeepSWE v1.1 74.2 , CyberGym 88.1 , AutomationBench 54.8 , and Agent’s Last Exam 31.8 . It posts a Codeforces rating of 3471, the highest among the models compared. It trails on some other benchmarks, including Terminal-Bench 3.0 and 4.0, ProgramBench, and HLE Humanity’s Last Exam , where models like Opus-5.0 score higher. This pattern points to a model tuned specifically for agentic, tool-using, and code-execution workloads rather than one optimized uniformly across every benchmark category. Is DeepSeek V4.1 Flash worth using? Other agents ship a demo. Remy ships an app. Real backend. Real database. Real auth. Real plumbing. Remy has it all. For teams building input-heavy agentic systems, coding agents, or applications that lean on very long context windows, the architecture’s efficiency claims are the main draw. Lower per-token KV cache costs translate directly into cheaper and faster inference at scale, particularly for workloads with long prompts and shorter generations, which is exactly the shape of most agent and tool-calling tasks. The model card’s benchmark tables back this up with strong agentic and coding scores. For use cases centered on pure factual recall, deep long-context reasoning, or open-ended knowledge benchmarks, the model’s numbers are less dominant, and other frontier models score higher in those categories. The MIT license and inclusion of a dedicated inference and encoding toolkit lower the barrier to trying it directly, without needing to go through a hosted API. Frequently Asked Questions What does “Flash” mean in DeepSeek V4.1 Flash? The model card doesn’t define the term explicitly, but in context it refers to the efficiency-focused variant of the DeepSeek V4.1 line, built around low activated-parameter counts 8B/16B and aggressive KV cache compression rather than maximizing total parameter count. How big is DeepSeek V4.1 Flash compared to its activated parameters? It has 552 billion backbone parameters total, but activates only 8 billion during prefill and 16 billion during decode, thanks to its Causal Encoder-Decoder architecture and Mixture-of-Experts routing 6 of 384 routed experts activated per token, plus 1 shared expert . What is the difference between CSA2 and standard sparse attention? Standard sparse attention limits which tokens each layer attends to, but each layer typically still computes and stores its own KV and index data. CSA2 assigns layers static modes Full, Reindex, Reuse so that KV data and sparse-attention indices can be shared or reused across layers instead of recomputed each time, reducing overall memory and compute. Does DeepSeek V4.1 Flash support images? Yes. It uses a vision encoder called DeepSeek-ViT combined with a two-layer MLP projector to convert images into embeddings that are processed jointly with text, integrated from the start of pretraining rather than added afterward. What license is DeepSeek V4.1 Flash released under? The model weights and repository are released under the MIT License, according to the official model card.