DeepSeek V4.1 Flash: Cheap Prefill for Agents That Read a Lot
Models

DeepSeek V4.1 Flash: Cheap Prefill for Agents That Read a Lot

V4.1 Flash splits a 552B MoE into an encoder and a decoder, with 8B active on input and 16B on output. Why that suits agents, what it beat, and what it retired.

Look at the token counts of any coding agent run and the shape is the same: the model reads far more than it writes. Every turn resends the system prompt, the tool definitions, the file contents and the transcript so far, and gets back a few hundred tokens of tool call. Prefill dominates.

DeepSeek V4.1 Flash, released on 10 September 2026, has an architecture built around that asymmetry rather than merely priced for it. It is also the model that replaced three others on DeepSeek's own API, which matters if you have code calling any of them.

An encoder-decoder, of all things

Most current LLMs are decoder-only: one stack of layers does both reading and writing, and every layer keeps its own key-value cache. V4.1 Flash uses what DeepSeek calls a Causal Encoder-Decoder (CED) design. Its 40 layers split into a 20-layer causal encoder and a 20-layer decoder.

The decoder's global key-value cache is projected from the encoder's final hidden states rather than built separately in every decoder layer, and the model card gives different active-parameter counts for prefill and decode.

The model is a mixture-of-experts with 552B total parameters, 384 routed experts plus one shared expert per MoE layer, and six routed experts active per token. The numbers that matter in practice are these:

  • About 8B active parameters per token during prefill.
  • About 16B active during decode, when the full model runs.
  • A key-value cache needing roughly a quarter of the GPU memory and an eighth of the SSD storage of the previous generation, per DeepSeek's announcement.

For comparison, V4 Flash activated about 13B parameters for both reading and writing. V4.1 Flash reads more cheaply and writes with more capacity. KV cache explained covers why the cache size, not just the parameter count, decides how many long sessions a server can hold.

Why the split suits agents specifically

A smaller cache per token means more cached prefixes fit in memory at once. For agents that is the important effect, because agent prompts are mostly repeated prefixes: the same system prompt and tools, the same repository context, growing by one turn at a time. Keeping more of that resident means fewer recomputations, lower time to first token and higher throughput per node.

Cheap prefill compounds with that. If 90% of your tokens are input, an architecture that spends 8B parameters on input and 16B on output is spending its compute where the quality is decided, on the tokens the model produces, while keeping the bulk of the bill on the cheap side. Prompt caching explained covers how to structure prompts so that prefix reuse actually happens.

It also accepts images as input; DeepSeek's announcement describes native multimodal support. Before this, image input in the V4 line existed only in the experimental V4 Flash Vision Exp.

A Flash model ahead of the old Pro

DeepSeek's model card compares V4.1 Flash at maximum reasoning effort against V4 Pro and V4 Flash. A selection:

  • Terminal-Bench 2.1: 90.6, against 87.9 for V4 Pro and 82.7 for V4 Flash
  • Terminal-Bench 3.0: 30.0, against 11.8 and 7.6
  • DeepSWE v1.1: 74.2, against 62.7 and 54.4
  • NL2Repo-Bench: 64.0, against 61.5 and 54.2
  • AutomationBench: 54.8, against 43.2 and 37.7
  • GPQA Diamond: 90.9, against 92.4 and 89.9
  • HLE: 36.8, against 42.7 and 37.8

The pattern is consistent. The largest gains are on long-horizon agentic and repository tasks; knowledge-heavy reasoning such as HLE and GPQA stays level or slightly behind V4 Pro. That is the profile you would expect from a model with a smaller decode path trained hard on agent work. If your workload is closer to hard question answering than to driving a terminal, do not assume the agentic gains transfer.

These are vendor numbers at maximum effort on DeepSeek's harness. Terminal-Bench explained covers what that benchmark measures and why scaffolding moves it.

The retirements it triggered

This is the part most likely to affect you without warning. DeepSeek's announcement retired V4 Flash and V4 Flash Vision Exp, with both aliases temporarily routing to V4.1 Flash. From 14 September 2026, requests to deepseek-v4-pro also route to V4.1 Flash at V4.1 Flash rates, until a V4.1 Pro launches. The new model ID on DeepSeek's API is deepseek-flash.

So if your code calls deepseek-v4-pro on DeepSeek's API, it has not been getting V4 Pro since mid-September. That may be fine, given the table above, but it is a different model with a different decode path, and outputs will have shifted. Pinning model versions covers why aliases break production quietly, and this is a textbook case.

Reasoning effort is a dial, not a switch

Rather than discrete low, medium and high settings, V4.1 Flash takes a reasoning effort integer from 1 to 100, trading inference cost for accuracy. The published benchmarks use 100. DeepSeek recommends temperature 1.0, top_p between 0.95 and 1.0, and a max_tokens of at least 256K, since long reasoning at high effort needs room.

Treat effort as something to tune per task type. Classification and extraction rarely need more than a low setting; multi-file debugging may justify the top of the range. Measure the difference rather than defaulting to maximum.

Variants, licence and price

The weights are on Hugging Face under the MIT licence. The context window is about 1M tokens. On OpenRouter the model is listed at around $0.03 per million input tokens and $0.14 per million output at the time of writing; DeepSeek's own API keeps peak and off-peak pricing, with off-peak at half the peak rate. OpenRouter also lists a :batch endpoint, which is the same model on an asynchronous queue for work that can wait. Batch API savings math covers when that trade is worth making; compare its listed price with the standard one before assuming it is cheaper: at the time of writing its input rate is listed higher than the standard endpoint's.

How to test it before switching

  1. Export ten real agent runs and note the input-to-output token ratio. The higher it is, the more this architecture favours you.
  2. Rerun them on V4.1 Flash at effort 30, 60 and 100 with your existing harness.
  3. Record completion rate, turns, time to first token and cost per completed task.
  4. If you use images, include screenshot-driven tasks separately; vision is new to the stable line.

If completion holds at a mid-range effort, you have found the setting that makes this model cheap in practice. Model routing and fallbacks covers escalating the hard minority of tasks to a stronger model.

Common questions

What is the Causal Encoder-Decoder architecture in DeepSeek V4.1 Flash?

Its 40 layers split into a 20-layer causal encoder and a 20-layer decoder. The decoder's global key-value cache is projected from the encoder output. DeepSeek gives about 8B active parameters per token during prefill and about 16B during decode.

Does deepseek-v4-pro still return V4 Pro?

Not on DeepSeek's own API. From 14 September 2026 requests to deepseek-v4-pro route to V4.1 Flash at V4.1 Flash rates until V4.1 Pro launches. The deepseek-v4-flash and vision-exp aliases also route to V4.1 Flash.

Is DeepSeek V4.1 Flash open weights?

Yes. The weights are on Hugging Face under the MIT licence. It is a 552B-parameter mixture-of-experts with a context window of about 1M tokens and image input, so self-hosting needs a large multi-GPU node.

Similar articles

DeepSeek V3.2-Exp: The Sparse Attention Experiment, Explained
Models
Models·8 min read

DeepSeek V3.2-Exp: The Sparse Attention Experiment, Explained

V3.2-Exp tested DeepSeek Sparse Attention on a 685B MoE and cut API prices by more than half. What DSA changed, what the scores showed, and why V3.2 replaced it.

Read
The DeepSeek V4 Family Explained: Pro, Flash and When
Models
Models·9 min read

The DeepSeek V4 Family Explained: Pro, Flash and When

Two models, one release date, a 3x gap in active parameters and a 3x gap in price. How to split traffic between DeepSeek V4 Pro and Flash sensibly.

Read
DeepSeek R1 in 2026: What the Open Reasoning Model Still Teaches
Models
Models·9 min read

DeepSeek R1 in 2026: What the Open Reasoning Model Still Teaches

DeepSeek R1 put an MIT-licensed reasoning model next to OpenAI o1 in January 2025. How it was trained, what the 0528 update fixed, and whether to run it today.

Read