DeepSeek V4.1 Flash: smaller KV cache, same post-training

DeepSeek V4.1 Flash: smaller KV cache, same post-training

We read the 51-page technical report and split what changed from earlier models into architecture, inference cost, and training method

Reading the DeepSeek V4.1 Flash report: a KV cache cut to a quarter of V4's, and post-training that keeps V4's SFT, RL, and OPD recipe, changing only the data.

By · TRAIL Labs Research
DeepSeekLLM architectureKV cacheReinforcement learningOn-policy distillationOpen weights

DeepSeek V4.1 Flash is nearly twice the size of V4-Flash yet cuts the KV cache per token to a quarter, and its post-training keeps V4's recipe of SFT, reinforcement learning (RL), and on-policy distillation (OPD) without algorithmic modification [1]. Architecture, inference cost, and pre-training data changed substantially; the post-training method stayed while its data and environments grew [1]. The report says post-training introduces no algorithmic innovation beyond well-established practice and that "all substantive changes lie instead in the data pipeline" [1].

We read all 51 pages of the technical report on Hugging Face in October 2026 and cross-checked every number in the text, tables, and figures [1]. Figures are reproduced from the report (MIT license). We did not run or reproduce the model and have no relationship with DeepSeek. All benchmark scores are DeepSeek's self-reported values.

How is DeepSeek V4.1 Flash different from earlier models?

The model grew while the part it uses per token and the amount it remembers shrank [1]. Per Table 1 of the report, V4.1 Flash has 552B backbone parameters, nearly double V4-Flash's 284B, but uses 8B parameters per token during prefill and 16B during decode [1]. V4-Flash activated 13B, and the larger V4-Pro 49B [1].

ItemV4-FlashV4-ProV4.1-Flash
Backbone parameters284B1.6T552B
Activated per token13B49B8B (prefill) / 16B (decode)
Global KV cache per token3,514 bytesnot reported890 bytes
Inputtexttexttext and images, jointly from the start

Table 1. Values from the report's Table 1 and Figure 1(b) [1]. V4.1 Flash also carries 196B of Engram memory parameters.

The KV cache is the intermediate state each layer stores so the model does not recompute tokens it has already read. As an agent calls tools dozens of times in a long session, the input to re-read far outweighs the text it generates [1]. The report treats KV storage and transfer bandwidth, more than compute, as the cost bottleneck here and redesigns the whole model around it [1].

Across generations the drop is large. Global KV cache per token was 389,120 bytes for V1 (November 2023), 48,068 for V3.2 (December 2025), 3,514 for V4-Flash (April 2026), and 890 for V4.1-Flash (September 2026) [1]. That is 1/437 of V1 [1].

A card with key figures for KV cache size, persisted storage, active parameters, and context length on the left and the report's Figure 1(b) comparing global KV cache per token across DeepSeek generations on the right

Figure 1. Global KV cache per token fell from 3,514 bytes in V4-Flash to 890 bytes [1].

How did DeepSeek V4.1 reduce the KV cache?

By stacking four mechanisms, each touching a different axis: layers, cross-layer sharing, storage precision, and how much gets recomputed [1].

Causal encoder-decoder (CED). The 40 layers split into a 20-layer encoder below and a 20-layer decoder above, and each decoder layer's global KV is projected directly from the hidden state of the last encoder layer rather than from its own [1]. The report describes it as building on the idea of YOCO [1][2].

Here is the number of layers (40), the hidden state of layer 20 (the last encoder layer), and and the KV entries and compression weights used by decoder layer . Running only the 20 encoder layers over the input yields the decoder KV, so prefill compute roughly halves [1]. That is why prefill activates 8B parameters, half of decode's 16B [1].

Three modes of CSA2. V4 mixed compressed sparse attention (CSA) with heavily compressed attention (HCA); V4.1 consolidates into CSA2 alone [1]. Each layer is fixed to one of Full, Reindex, or Reuse. Full builds its own KV and picks positions to read, Reindex borrows a preceding layer's KV and only re-picks positions, and Reuse takes both the KV and the picked positions from a preceding layer [1]. The encoder runs one Full layer per five Reuse layers and the decoder one Full or Reindex per three Reuse, so most layers store no KV of their own [1]. In the decoder, the first Full layer pre-selects a pool of up to 16,384 candidate positions and later Reindex layers search only inside it, so their selection cost no longer grows with context length; the first Full layer still scores the whole context [1].

FP4 KV cache. The main KV is stored in 4 bits (E2M1 with one E4M3 scale per 16 channels), about half the footprint of V4's 8-bit cache [1]. Quantization is trained in during post-training, and the precision-sensitive local-window KV stays at 8 bits [1].

SWA Bounded Replay. Every layer also has sliding-window attention (SWA) over the last 128 tokens [1]. V4 persisted that local KV to SSD as well, and it took nearly half the persistent cache [1]. V4.1 moves local KV out of the SSD cache into a pool built from 10% of each server's host memory with a lifetime of minutes, and approximately reconstructs it by recomputing only the last 128 tokens on a miss [1]. Exact reconstruction would require layers × 128 tokens, but citing prior evidence that the effective receptive field is much narrower, the report truncates the range and observes negligible quality loss [1]. Dropping local KV halves the persisted cache and global KV shrinks to a quarter, so the long-term persisted KV became an eighth of V4-Flash's [1].

A card with four changes, CED, the three CSA2 modes, FP4 KV, and SWA Bounded Replay, on the left and the report's Figure 3 architecture split into a 20-layer encoder and 20-layer decoder on the right

Figure 2. The decoder builds its KV from the encoder's output, and most layers reuse a preceding layer's KV [1].

Together these make per-token decode compute nearly independent of context length. Extending context 256-fold, from 4K to 1M, raises decode FLOPs by only a quarter [1].

What else changed in the architecture?

Three more components arrived beyond the KV changes [1]. Engram is a conditional memory module that decouples memorization from computation: 196B of hashed embedding tables over 2-, 3-, and 4-token n-grams attached at layers 1 and 14 (zero-indexed) [1]. Because lookup addresses depend only on input tokens, embeddings can be prefetched from host memory during computation [1]. DSpark is a speculative decoder that drafts five positions at once and picks verification length by confidence; unlike V3's multi-token prediction (MTP), it is trained separately after pre-training rather than jointly with the backbone [1]. Single-Pass mHC shifts the mixing coefficients of V4's multiple residual streams by one block so a single deployment kernel halves memory traffic [1].

On the training side, head-wise Muon applies a separate preconditioner per attention head, and Sinkhorn-balanced updates replace Adam for Engram and embedding tables to save optimizer memory [1]. Pre-training used 45T tokens of mixed image and text data, training sparse attention from scratch at 64K length and extending to one million tokens at 34T tokens [1].

Did DeepSeek V4.1 change its post-training method?

The post-training method did not change [1]. Section 5.1 states that this release introduces no new post-training algorithm and follows the standard recipe of supervised fine-tuning (SFT) followed by reinforcement learning (RL) and on-policy distillation (OPD), as used in V4 development [1]. Effort went almost entirely into what the model is trained on rather than how it is optimized, and the report says that under a fixed, unremarkable optimization procedure, the scale, diversity, and verifiability of synthesized data and environments account for essentially all observed post-training gains [1]. Pre-training was different: a 45T-token multimodal corpus, Engram, and head-wise Muon, with base-model gains credited to improved data curation [1].

On-policy distillation has a teacher score, token by token, the answers the student itself generates, and the student follows that distribution [3][4]. Because the student learns on the paths it actually takes, it drifts less from real usage than ordinary distillation that copies teacher outputs [4]. V4.1 places this stage last and attaches more than 40 teachers, the strongest per domain, even when their architectures differ [1].

What changedDetail
Task synthesisThe model builds (problem, environment, verification) triplets and is trained on difficulty and correctness as rewards
General agent environmentsMocked tools reproducing real interfaces from internal and partner usage; failure cases replayed for targeted RL
Coding agent environmentsMultiple agents turn public repos into container tasks; separate inspection and repair agents verify them
Reasoning-effort controlAn effort value from 1 to 100 in the system prompt, with a length penalty scaled to it
Training infrastructureAsynchronous rollout and training; tokens that are too stale are masked out of the loss
Final distillationFull-vocabulary on-policy distillation over all domains with 40+ teachers

Table 2. Everything that changed in post-training sits on the data, environment, and infrastructure side [1]. The grouping is ours, from Sections 5.1 and 5.2.

The gains were largest on agentic work. At max effort in Table 3, moving from V4-Flash to V4.1-Flash took DeepSWE v1.1 from 54.4 to 74.2, Terminal-Bench 2.1 from 82.7 to 90.6, and Automation-Bench from 37.7 to 54.8 [1]. That difference also includes the backbone growing from 284B to 552B and the pre-training changes; what the report states explicitly is that the post-training algorithm did not change [1].

A card with the SFT, RL, and OPD post-training recipe unchanged from V4 and a quote from the report on the left and agentic benchmark scores for V4-Flash and V4.1-Flash on the right

Figure 3. The post-training recipe matches V4, and agentic benchmark scores rose sharply (self-reported, selected items) [1].

The effort value doubles as a cost knob. The public API's low, high, and max map to effort 50, 75, and 100, and raising effort from 25 to 100 lifts DeepSWE from 66.0 to 74.2 at roughly 2.5 times the output tokens [1]. The report notes that the 60 to 80 range recovers most of max accuracy at under half the tokens [1].

What are the limits of this report?

The authors note that CSA2 selection errors and the approximate SWA reconstruction could degrade performance in untested extreme conditions [1]. They also say benchmarks are saturating, so near-equal scores still leave a gap to top closed models on the hardest tasks [1].

We add a few from our reading. All scores are self-reported, and no experiment separates how much of the gain came from architecture versus data. Both third-party measurements were unfavorable on token use or speed. One hands-on test of the October 17 update found higher UI scores but 40% more tokens, noting that DeepSeek claims the opposite [5]. A PR review benchmark found V4.1 Flash cheap per PR ($0.42) but slower than GPT-6 Sol (2 minutes 17 seconds) at 6 minutes 32 seconds [6]. The company behind it sells a model-routing service. Both use limited samples and tasks, so read them as direction.

Why read the technical reports of open models?

The report states that post-training has no new algorithm [1]. The post-training flow of SFT, RL, and on-policy distillation is the same as V4; what changed is an architecture that rebuilds the cost structure, the pre-training data, and the data and environments fed into post-training [1]. The report credits the cost cut to architecture and the quality gain to pre-training data curation and the post-training data pipeline; the near doubling of backbone parameters is not isolated [1]. The benchmark table alone does not show that split.

Closed models generally do not disclose layer layout, cache sizes, or training stages at this level. So each time a report like DeepSeek's arrives with architecture and weights, taking it apart and studying it is one of the most direct ways for teams that do not train models to keep up with the model side. Teams like ours that build products on models can carry two points straight into design: in input-heavy agentic work, cost comes from prefill and KV storage, and a single effort value trades cost against accuracy [1].

Frequently asked questions

How is DeepSeek V4.1 Flash different from earlier models?

Per the report, backbone parameters grew from V4-Flash's 284B to 552B, but the global KV cache per token fell from 3,514 bytes to 890 bytes, a quarter. It activates 8B parameters during prefill and 16B during decode, is natively multimodal from the start of pre-training, and takes up to one million tokens of context. The post-training method is the same as V4, and self-reported agentic benchmark scores rose sharply.

How did DeepSeek V4.1 reduce the KV cache?

By stacking four mechanisms: a causal encoder-decoder (CED) in which the upper half of the layers builds its KV from the last lower layer, CSA2 in which layers share the same KV and selections, an FP4 cache for the main KV, and SWA Bounded Replay, which moves local-window KV out of the SSD cache into a short-lived host-memory pool and recomputes only the last 128 tokens on a miss. The KV always resident in GPU memory became a quarter of V4-Flash's, and the long-term persisted KV an eighth.

Did DeepSeek V4.1 change its post-training method?

The post-training method did not change. The report says it follows V4's standard recipe of supervised fine-tuning (SFT), reinforcement learning (RL), and on-policy distillation (OPD) without modification beyond well-established practice, and that all substantive changes are in the data pipeline. What changed is the scale of automated task and environment synthesis, asynchronous training infrastructure, a reasoning-effort control signal, and a final distillation stage with more than 40 teachers.

Why read the technical reports of open models?

Closed models generally do not disclose architecture and training details at this level, so it is hard to check where cost comes from or what drives performance. DeepSeek's report gives layer layout, cache sizes, and training stages and releases the weights under MIT, which lets teams building products on models reason about cost structure and limits from evidence.

References

  1. [1]DeepSeek-AI, "DeepSeek-V4.1-Flash: Pushing the Limits of KV Cache Compression", Technical Report, 2026 (MIT license)
  2. [2]Yutao Sun et al., "You Only Cache Once: Decoder-Decoder Architectures for Language Models", 2024
  3. [3]Yuxian Gu et al., "MiniLLM: On-Policy Distillation of Large Language Models", ICLR 2024
  4. [4]Kevin Lu, Thinking Machines Lab, "On-Policy Distillation", 2025
  5. [5]Peter Petruš, "New DeepSeek V4.1 Flash (1017). Better results, but at what cost?", LinkedIn, 2026-10
  6. [6]Patrick Collins (Dam Secure), PR review benchmark post, LinkedIn, 2026-09-28

Summary

  • DeepSeek V4.1 Flash is a 552B multimodal MoE model that activates 8B parameters for prefill and 16B for decode and accepts up to one million tokens.
  • A causal encoder-decoder, cross-layer KV sharing (CSA2), and an FP4 KV cache bring the global KV per token to 890 bytes, a quarter of V4-Flash and 1/437 of V1.
  • Removing local-window KV from the SSD cache and shrinking global KV to a quarter made the long-term persisted KV an eighth of V4-Flash's.
  • Post-training keeps V4's SFT, RL, and on-policy distillation recipe, and the report attributes almost all post-training gains to the data and environment pipeline.
  • Scores are self-reported, no experiment separates the contributions of architecture and data, and both third-party usage measurements were unfavorable on token use or speed.

Check this topic against your own brand

TRAIL Search measures how ChatGPT and Perplexity answer your customers' questions and finds and fixes where the brand is missing, turning this post into a diagnosis. Start with 10 questions, no card required.

More posts

Keep reading on this topic

This post is part of the Papers category, which collects all 30 posts on the topic. See all posts in Papers