DeepSeek’s Flash Leapfrogs Pro Again: How V4.1’s architecture reduces cache reads

When agents make a tool call, they send the same context back through the model every time.

Share
Graph illustrates decreasing memory use per token in DeepSeek models, highlighting V4.1-Flash efficiency.

When agents make a tool call, they send the same context back through the model every time. DeepSeek says storing and moving all that context has become a bigger obstacle to keeping serving costs down than the computation a model performs to generate output. Its new architecture sidesteps that bottleneck.

What’s new: DeepSeek released DeepSeek-V4.1-Flash, its first model with a redesigned architecture that uses far less memory per token of context. It also cut its API prices. This is the first model in DeepSeek’s V4 series to accept images as input, outside of an experimental preview. It’s also very fast, second only to Gemini 3.8 Flash in tokens/second.

  • Input/output: Text and images in (up to 1 million tokens), text out (up to 384,000 tokens, 225.6 tokens per second)
  • Architecture: Encoder-decoder mixture-of-experts transformer, transformer-based vision encoder, 552 billion backbone parameters plus 196 billion in a memory module, 8 billion active per token while reading input and 16 billion while generating output
  • Features: Reasoning (none, low, high, or max via the API; any integer from 1 to 100 in the released weights), tool calls, context caching
  • Performance: 39 points on Artificial Analysis’ Intelligence Index; top open weights model on Vals AI’s Vals Index at time of release (currently fourth, 51.32 percent)
  • Availability/price: Via DeepSeek’s app and website; via DeepSeek’s API at $0.30/$0.006/$1.20 per million input/cached/output tokens during peak hours, half price at all other times
  • Weights/license: Free for commercial and noncommercial use under the MIT license
  • Undisclosed: Knowledge cutoff, training data

How it works: A paper details how DeepSeek redesigned its V4 architecture. The authors reduced the key-value cache (the keys and values a transformer stores for every token it has read so that it avoids recomputing them) and the computation spent reading input.

  • Of the model’s 40 layers, half read and half write. Instead of each decoder layer computing its own keys and values over the full input, the decoder derives them from the encoder’s last layer, so most of a prompt runs through only the encoder. DeepSeek says this nearly halves prefill computation (reading prompts before generating replies).
  • Most layers borrow another layer’s cache. In DeepSeek-V4.1-Flash, each layer uses one of three modes. Full layers compute keys and values and select the 512 most relevant entries to attend to; reindex layers borrow the previous full layer’s cache but choose for themselves which 512 entries to attend to; reuse layers borrow the cache and the selected 512 entries from an earlier layer. Only 4 of the 40 layers compute a full input cache, three in the encoder and one in the decoder. Every layer keeps its own uncompressed cache of the most recent 128 tokens, computed from its own view of the text, so it attends to recent tokens in full while the shared cache supplies the 512 most relevant entries from the entire input.
  • DeepSeek-V4.1-Flash stores its full-input cache in 4-bit numbers rather than 8-bit, but every group of 16 numbers shares one 8-bit multiplier that restores the group’s scale and trains the model during fine-tuning to tolerate the rounding, which helps maintain precision. Sharing caches across layers plus 4-bit storage brings the entire input cache to 890 bytes per token, about four times smaller than DeepSeek-V4-Flash’s and 437 times smaller than DeepSeek-V1’s. With the combined changes, the computation needed to generate each output token rises by only 25 percent as input grows from 4,000 tokens to 1 million tokens.
  • DeepSeek’s servers keep each prompt’s full-input cache for at least 72 hours, so repeated prefixes needn’t be recomputed. DeepSeek-V4.1-Flash only keeps them in server memory for minutes. If a request arrives after they’ve expired, the system re-reads the last 128 tokens of the prompt to rebuild an approximate version. An exact rebuild would require re-reading 128 tokens for each of 40 layers (5,120 tokens) because each layer’s short-range cache depends on its preceding layer. DeepSeek says the approximation barely affects output quality and reduces the cache to an eighth of DeepSeek-V4’s.
  • DeepSeek pretrained the model on 45 trillion tokens of text and images. It was fine-tuned according to DeepSeek-V4’s recipe: supervised learning, reinforcement learning, then on-policy distillation, in which the model was fine-tuned to match what more than 40 specialist models would have written. The teachers were DeepSeek’s own checkpoints from different training stages and domains.
  • DeepSeek says it did not alter its training algorithms; instead, the authors credit performance gains over DeepSeek-V4 to automated pipelines that generate training tasks and agent environments.

Performance: Independent evaluators found that DeepSeek-V4.1-Flash outperforms its predecessor and the larger DeepSeek-V4-Pro-0813. It costs less than half as much per task and generates output more than twice as fast. It briefly led open weights models on Vals.ai’s index (prior to the release of MiMo v2.6 Pro) and tops all models on one independent test of business-software agents. 

  • On Artificial Analysis’ Intelligence Index v4.3.2, a composite of 10 evaluations of agentic across mathematics, science, coding, and reasoning, DeepSeek-V4.1-Flash set to max reasoning (39 points, $0.27, and 4.9 minutes per task) outperformed DeepSeek-V4-Pro-0813 set to max reasoning (36 points, $0.67, and 8.7 minutes per task). Among open weights models, it trailed MiMo v2.6 Pro (46 points, $0.13 per task), GLM-5.3 (45, $2.01) and GLM-5.3-Flash (42, $0.25, and 11.1 minutes per task).
  • On AutomationBench-AA, a test of how well agents complete business workflows across simulated app environments such as Gmail, Salesforce, and Jira, DeepSeek-V4.1-Flash set to max reasoning (68.9 percent) led all models tested, including GPT-6 Astra set to max reasoning (68.5 percent) and Grok 4.6 set to xhigh reasoning (67 percent).

Behind the news: Shrinking the key-value cache has been a DeepSeek theme since its second-generation model. Rivals have borrowed DeepSeek’s techniques and developed their own to likewise compete on cache size.

  • In May 2024, DeepSeek-V2 introduced multi-head latent attention, which compressed keys and values into a small vector and reduced the key-value cache by 93.3 percent relative to DeepSeek 67B. Three months later, DeepSeek began storing caches on hard disks and charging a tenth as much for inputs the cache already held. 
  • DeepSeek-V4.1-Flash’s design builds on YOCO, a 2024 Microsoft and Tsinghua University design in which the upper half of a transformer’s layers reuse the cache produced by the lower half.
  • The release arrived days before Anthropic accused DeepSeek and six other Chinese developers of distilling Claude models to improve their own models and to serve Claude’s output to their customers. DeepSeek’s paper says it distilled the model from more than 40 of its own checkpoints, taken from different stages of training, and doesn’t mention outside models.

Why it matters: Agents usually read more than they write. Because each tool call sends a growing transcript back through the model, storing and re-reading context can cost more than generating output. DeepSeek’s price cut is steepest where long-running agents use the most tokens: The cost for previously cached input fell 57 percent, while the cost of output fell 9 percent.

We’re thinking: A year ago, model makers strove to lengthen context windows. DeepSeek-V4.1-Flash keeps its predecessor’s 1 million-token context and instead makes it cheaper to keep: 890 bytes of cache per token, 437 times smaller than DeepSeek-V1’s and 4 times smaller than DeepSeek-V4-Flash’s. If other model makers follow DeepSeek’s lead, launches may soon tout cache size per token alongside context windows and cost per token.