DeepSeek V4.1-Flash
DeepSeek V4.1-Flash is an open-weight multimodal mixture-of-experts model released by DeepSeek on September 10, 2026. It accepts text and images and generates text. DeepSeek describes the model as a 552-billion-parameter language backbone supplemented by 196 billion parameters of Engram conditional memory. The backbone activates about 8 billion parameters per input token during prefill and 16 billion per generated token during decoding. Its released configuration supports a context window of 1,048,576 tokens [1][2][3].
V4.1-Flash introduced a 40-layer Causal Encoder-Decoder architecture, Compressed Sparse Attention 2, FP4 storage for the main KV cache, Engram lookup memory, and a DSpark speculative decoding module. These mechanisms target the cost of repeatedly processing and caching long prompts, especially in tool-using agent workloads. DeepSeek reports that the global KV footprint is 890 bytes per token, about one-quarter that of the earlier DeepSeek V4-Flash, and that its deployment method reduces persistent KV storage to about one-eighth of the earlier model's footprint at the same sequence length [1][2]. These comparisons are vendor measurements, not independently reproduced results.
The model weights and accompanying code are available from Hugging Face under the MIT License. The repository includes a prompt encoder, a readable inference implementation, an evaluation recipe, model configuration, and a technical report. DeepSeek labels the included inference code as a reference implementation rather than a production serving engine [1][10][12].
Release and model identity
DeepSeek announced V4.1-Flash through its official social account and API update log on September 10, 2026. The hosted API identifier at launch was deepseek-flash. DeepSeek also said the older deepseek-v4-flash and deepseek-v4-flash-vision-exp identifiers would temporarily route to V4.1-Flash. It announced a separate plan to route deepseek-v4-pro requests to V4.1-Flash beginning at 04:00 UTC on September 14, pending a future V4.1-Pro release. Because that date was still in the future when this article was researched, the routing change is an announced transition rather than a completed historical event [4][5].
V4.1-Flash is distinct from both the older V4-Flash family and DeepSeek V4-Pro. The earlier V4-Flash model card described a 284-billion-parameter backbone with 13 billion active parameters per token. V4.1-Flash instead has a 552-billion-parameter backbone, separates prefill and decode activation at 8 billion and 16 billion parameters, incorporates a native vision pathway, and uses a new prompt format [1][2].
The term "552B" in DeepSeek's release material refers to backbone parameters. The technical report separately lists 196 billion Engram parameters, which are sparsely accessed lookup memory. Adding the two figures and calling V4.1-Flash a "748B model" would erase the distinction made in the primary source, so they are reported separately here [2].
Architecture
V4.1-Flash is a multimodal large language model built as a 40-layer causal Transformer. Its lower 20 layers form a causal encoder, and its upper 20 layers form a decoder. Unlike a conventional sequence-to-sequence encoder, the causal encoder cannot attend to future tokens. It prepares global key-value representations that the decoder can reuse while preserving autoregressive generation [1][2].
| Component | Released configuration |
|---|---|
| Language backbone | 40 layers, 5,120 hidden size, 64 attention heads, one KV head |
| Layer split | 20-layer causal encoder and 20-layer decoder |
| Context length | 1,048,576 positions |
| Local attention | 128-token sliding window |
| Experts | 384 routed experts plus one shared expert; six routed experts selected per token |
| Activated backbone parameters | About 8B per token during prefill, 16B during decode |
| Conditional memory | 196B Engram parameters across two modules |
| Vision encoder | 32 layers, 1,024 hidden size, 16 heads, 14-pixel patches |
| Sparse selection | Top 512 positions; later decoder indexers search a 16,384-position candidate pool in the released setup |
The table summarizes the public report and configuration file [2][3]. The context limit and parameter counts describe the released model, while achievable request length and throughput also depend on a serving implementation and available memory.
Causal Encoder-Decoder
During ordinary Transformer prefill, every prompt token passes through every layer, and each layer produces its own global keys and values. V4.1-Flash's Causal Encoder-Decoder, or CED, instead projects the decoder's global keys and values from the final causal-encoder hidden states using decoder-layer-specific projection weights. Most prompt tokens therefore require full computation through only the lower half of the network for the global-attention path [2].
The decoder still computes layer-specific sliding-window attention. For a prompt of length N, a network depth L, and a local window n, the report models CED prefill complexity as approximately O(NL/2 + nL/2) rather than O(NL) when N is much larger than the local window. DeepSeek reports that this nearly halves prefill computation in its implementation while keeping performance close to its comparison baseline [2]. The design is related to the earlier YoCo architecture, which likewise shares cached representations across upper layers, but V4.1-Flash adds its own global-cache projections, local-attention path, and cache-reconstruction system [2][13].
Compressed Sparse Attention 2
Compressed Sparse Attention 2, or CSA2, reduces global-attention storage and indexing work along the token and layer dimensions. Every CSA2 layer creates its own query and local sliding-window keys and values. Its three static modes differ in how the global cache and sparse selection are obtained [2].
- Full mode computes new main keys and values, index keys and queries, and a fresh top-k selection.
- Reindex mode reuses main keys and values plus index keys from an earlier layer, but computes a new query and new selection.
- Reuse mode reuses both the earlier global cache and the most recent compatible top-k selection.
This separation lets some layers update the attended positions without keeping another complete global cache, while other layers avoid both cache creation and rescoring. CSA2 also removes an overlapping compression pattern and absolute position embedding used by the preceding CSA design, and it derives index keys from main KV entries rather than through a separate hidden-state compression path [2].
The decoder uses a hierarchical sparse indexer. Its first Full-mode CSA2 layer scores all causally visible global positions, selects blocks by their maximum index score, and creates a shared candidate pool. In the released configuration, the pool comprises 2,048 blocks of eight positions, or 16,384 candidate positions. Later Reindex layers search that fixed pool before selecting 512 positions. The first global scan still grows with context length, but the later indexers' search size is bounded by the candidate-pool setting [2][3].
KV-cache formats and bounded replay
The report distinguishes runtime global KV, which remains in accelerator memory, from persistent KV used to resume or reuse prefixes from SSD or host memory. V4.1-Flash stores the main global KV in FP4 and the local sliding-window KV in FP8. Along with cross-layer reuse, this produces a reported global-cache footprint of 890 bytes per token, about one-quarter of the V4-Flash footprint at equal sequence length in DeepSeek's stack [1][2][3].
Persisting every layer's local sliding-window state would weaken the storage saving. SWA Bounded Replay instead stores the long-lived global state and reconstructs the missing local state by replaying only the most recent window of tokens. The reconstruction is approximate: an exact reconstruction would need to replay the window through each relevant layer. DeepSeek reports negligible degradation in the conditions it tested and an overall persistent-cache footprint about one-eighth that of V4-Flash, but the report also identifies cache-resumption boundaries as an area requiring more stress testing [2].
Experts, conditional memory, and decoding
Each feed-forward block uses DeepSeek's fine-grained MoE design. The released configuration has 384 routed experts, one shared expert, and six routed experts selected for each token. Image and text tokens use separate correction biases for load balancing, while the unadjusted routing scores determine how selected expert outputs are weighted [2][3].
Engram adds two sparsely accessed conditional-memory modules at backbone layers 1 and 14, using zero-based numbering. Each module hashes token n-grams of orders two through four into multiple embedding tables. Together the modules contain 196 billion parameters. Because the lookup address depends on the input sequence, embeddings can be prefetched from host memory while Transformer computation proceeds. The standalone Engram paper presents this as a way to separate some memorization capacity from dense computation through constant-time hashed lookup [2][14].
The architecture also includes Single-Pass mHC for residual-stream mixing and kernel fusion. DeepSeek's report says the implementation halves activation-memory traffic compared with its preceding four-kernel mHC implementation [2]. V4.1-Flash replaces the earlier multi-token-prediction module with DSpark, a separately trained speculative-decoding component that drafts groups of tokens and adjusts verification length according to confidence and serving load. DSpark is trained after the backbone pretraining stage and continues training alongside the backbone during post-training without sending its own objective gradients into the backbone [2][15].
Multimodal pathway
V4.1-Flash accepts images through a vision encoder called DeepSeek-ViT. The encoder is based on a Vision Transformer, but it replaces absolute position embeddings with two-dimensional rotary position encoding, uses a linear patch projection, RMS normalization, and SwiGLU activations. A 3 by 3 pixel-unshuffle step reduces the spatial token grid by a factor of nine. A two-layer MLP then projects the visual features into the language backbone's hidden dimension, where they are interleaved with text embeddings [1][2][3].
DeepSeek reports training the vision encoder from scratch in two preliminary stages. A contrastive stage used about 47 billion image-text pairs at resolutions no greater than 224 by 224 pixels. An autoregressive stage connected the encoder to a temporary 4-billion-parameter MoE language model and trained on 236 billion tokens drawn from image captions, alternative text, charts, and optical-character-recognition data at resolutions between 544 by 544 and 1,344 by 1,344 pixels. DeepSeek then discarded the temporary language model and retained the vision encoder for joint training with V4.1-Flash [2]. The report gives aggregate source types and counts but does not publish a source-by-source corpus inventory or license audit.
For the hosted API as documented on September 10, 2026, DeepSeek accepted JPEG, PNG, GIF, and WebP images supplied by URL, base64 data, or its Files API. The service limited an image to 1,024 visual tokens and documented request-level byte, dimension, and image-count limits. Those are service constraints and may differ from what a self-hosted runtime can support [7].
Training and post-training
DeepSeek reports pretraining V4.1-Flash from scratch on 45 trillion tokens. Text-only and multimodal pipelines were combined with overlapping text-only samples replaced by their multimodal versions, producing a reported 7:1 ratio of text-only to multimodal tokens. Training began with sparse attention at a sequence length of 64,000 rather than using a dense-attention warmup. Context was extended to one million tokens after 34 trillion training tokens [1][2].
The disclosed optimizer mixture used AdamW for normalization weights and other non-matrix parameters, Muon for the main matrix parameters, a head-wise Muon variant for query and key matrices, and momentum updates followed by Sinkhorn balancing for Engram tables, token embeddings, and the prediction head. The training batch remained at 100.6 million tokens. These are author-reported details; neither the full training dataset nor a complete training system capable of reproducing the checkpoint was released [2].
Post-training followed supervised fine-tuning, reinforcement learning, and on-policy distillation. DeepSeek says the principal change from its earlier recipe was not a new optimization algorithm but a larger automated pipeline for constructing tool-use environments, coding tasks, evaluation points, and rollouts. Generated tasks were attempted by multiple agents and reviewed by a separate quality-inspection agent before entering training [1][2].
Reasoning effort
The open-weight prompt format accepts an integer reasoning effort from 1 through 100. Its released encoder recognizes three string aliases: low maps to 50, high maps to 75, and max maps to 100; high is the default. DeepSeek's hosted API uses the same values for those three native tiers. Its compatibility layer also accepts additional requested labels: minimal and low route to native low; medium, high, and xhigh route to native high; and max and ultra route to native max [2][8][9]. The value 25 appears in DeepSeek's reasoning-effort ablation, but it is not a released string alias.
DeepSeek's ablation raised effort from 25 to 100. The report says average pass-at-one across eight reasoning-heavy benchmarks increased from 67.1 to 76.3, DeepSWE v1.1 increased from 66.0 to 74.2, and Terminal-Bench 2.1 increased from 82.4 to 90.6, while average output length grew by about 2.5 times. The authors found most gains between the low and middle settings, with diminishing returns near 100 [2]. These are internal results and do not establish the best setting for every application.
DeepSeek-reported evaluation
DeepSeek published the following selected results for the instruction-tuned model at maximum reasoning effort. Its two primary evaluation descriptions disagree on one sampling setting. The current model card says every listed instruction-model result used temperature 1.0 and top-p 0.95. Section 5.3.1 of the technical report instead says GPQA Diamond, Humanity's Last Exam, Codeforces, and MathArena Apex used temperature 1.0 and top-p 1.0, while code-agent and visual-agent evaluations used temperature 1.0 and top-p 0.95 [1][2]. Neither source explains the difference, so the mixed table below should be read with that unresolved discrepancy. Code-agent tests generally used the Minimal mode of DeepSeek Harness and a one-million-token context, while exceptions used benchmark-specific scaffolds. Visual-agent tests used a Claude Code scaffold and a 512,000-token context [1][2][11].
| Area | Benchmark and metric | DeepSeek-reported V4.1-Flash result |
|---|---|---|
| Science reasoning | GPQA Diamond, pass@1 | 90.9 |
| Broad expert questions | Humanity's Last Exam, pass@1 | 36.8 overall; 39.1 on the text-only subset |
| Competitive programming | Codeforces rating | 3,471 |
| Terminal agent | Terminal-Bench 2.1, pass@1 | 90.6 |
| Terminal agent | Terminal-Bench 3.0, pass@1 | 30.0 |
| Terminal agent | Terminal-Bench 4.0, pass@1 | 31.2 |
| Software engineering | DeepSWE v1.1, resolved | 74.2 |
| Cybersecurity | CyberGym, pass@1 | 88.1 |
| General tool use | Automation-Bench, pass@1 | 54.8 |
| Visual chart agent | Chartography with tools, pass@1 | 78.9 |
| Visual reasoning | BabyVision with tools, pass@1 | 89.6 |
| Visual reasoning | ZeroBench-main with tools, pass@5 | 49.0 |
All values in the table come from DeepSeek's release evaluation [1][2]. Terminal-Bench evaluates agents inside command-line environments, while DeepSWE uses repository-level software tasks. Their scores depend on the model, prompt, tools, sandbox, token budget, and agent loop rather than on the checkpoint alone [16][17]. CyberGym evaluates vulnerability reproduction against real software repositories [19]. Humanity's Last Exam is a multimodal collection of closed-ended expert questions spanning many academic subjects [20]. The released model was new on the research date, and no independent rerun of the complete final-checkpoint table was available for this article.
Scaffold sensitivity
DeepSeek also ran the same checkpoint across several agent scaffolds. On DeepSWE v1.1, it reported results from 65.5 to 74.2 across the listed configurations. On Terminal-Bench 2.1, the range was 84.1 to 90.6 [1][2].
| Scaffold | DeepSWE v1.1 resolved | Terminal-Bench 2.1 pass@1 |
|---|---|---|
| Claude Code | 69.8 | 88.0 |
| Codex | 65.6 | 84.1 |
| OpenCode | 65.5 | 85.0 |
| Pi | 66.2 | 86.1 |
| mini-SWE | 74.2 | 90.3 |
| DeepSeek Harness Minimal | 72.6 | 90.6 |
| DeepSeek Harness Standard | 70.5 | 85.8 |
| DeepSeek Harness PTC | 67.6 | 85.8 |
DeepSeek used eight samples per DeepSWE task and three per Terminal-Bench task, Linux containers, temperature 1.0, top-p 0.95, a one-million-token context cap, and no more than 500 model-generation rounds. Terminal-Bench was run without network access [1][2]. The spread is evidence that an agent benchmark is a model-and-scaffold result; it should not be read as a single immutable property of the model.
NL2Repo discrepancy
Two current DeepSeek-controlled sources disagree on one result. The live Hugging Face model card lists V4.1-Flash at 64.0 on NL2Repo-Bench, while Table 3 of the technical report and the API update log list 65.4 [1][2][5]. No revision note explains the difference. This article therefore does not select either number as authoritative. NL2Repo-Bench is a repository-level code-generation evaluation, and the inconsistency should be resolved before using this row in a comparison [18].
Availability, API limits, and pricing
At launch, DeepSeek offered V4.1-Flash through the deepseek-flash API model name and through the public Hugging Face repository. The hosted service documented a one-million-token context window, up to 384,000 output tokens, native vision input, tool calls, JSON output, context caching, fill-in-the-middle in non-thinking mode, an OpenAI-compatible Responses interface, and an Anthropic-compatible interface. It listed a maximum concurrency of 2,500 requests [5][6]. These are service capabilities and limits, not guarantees for third-party hosts.
The following API prices were listed by DeepSeek on September 10, 2026 and are stated per one million tokens [5][6]:
| Token class | Peak price | Off-peak price |
|---|---|---|
| Cached input | $0.006 | $0.003 |
| Uncached input | $0.30 | $0.15 |
| Output | $1.20 | $0.60 |
DeepSeek defined peak periods as 01:00 to 04:00 UTC and 06:00 to 10:00 UTC on Monday through Friday, with all other times off-peak [6]. Pricing and limits are time-sensitive. The table records the launch state rather than promising that those terms remain current.
Open weights and self-hosting
The Hugging Face repository is public and ungated, with weights and accompanying source files under MIT terms [1][12]. The configuration identifies the architecture as DeepseekV41ForCausalLM, stores routed-expert weights in FP4 within an FP8 quantization configuration, and defines a 1,048,576-position limit [3]. Because the checkpoint includes hundreds of billions of backbone and lookup-memory parameters, practical self-hosting requires substantial accelerator and host-memory resources even though only a small fraction of experts activate for each token.
The repository's minimal inference code covers the vision encoder and projector, CSA2, the hierarchical indexer, Engram lookup, MoE blocks, mHC, and the DSpark forward path. Its generation loop uses ordinary autoregressive sampling, and its own documentation says it is intended for readability rather than production serving [10]. The prompt-encoding reference is separate from the runtime. It documents the V4.1 conversation format, tool-call markup, image placeholders, mid-conversation system messages, and numeric reasoning-effort prefix [9].
The model card recommends temperature 1.0, top-p 0.95 or 1.0, a one-million-token context window, and a generation budget of at least 256,000 tokens for its documented evaluation style [1]. Those settings reflect DeepSeek's intended high-budget agent use and can be costly. They are not minimum requirements for ordinary short responses.
Limitations
The technical report states that the new architecture's robustness boundaries are not fully characterized. It specifically identifies two possible failure sources: sparse-selection errors in CSA2 and capability degradation from the approximate local-state reconstruction used by SWA Bounded Replay. DeepSeek says these were not systematic in its internal tests, but finite testing cannot cover every extreme prompt, context pattern, or cache-resumption boundary [2].
DeepSeek also cautions that small benchmark gaps do not establish parity with leading proprietary systems on difficult reasoning problems and edge cases [2]. The release table uses maximum reasoning effort and large context budgets, and several values depend on particular agent scaffolds. It should therefore be interpreted as a disclosed vendor evaluation, not as independent evidence that the model is best for every workload.
The training report gives aggregate token counts, source types, and mixture ratios but not a source-by-source inventory of the 45-trillion-token corpus. It does not provide enough information to independently audit the corpus for licensing, contamination, consent, or geographic and linguistic balance [2]. The MIT license covers the released artifacts; it does not by itself answer those training-data questions.
See also
References
- ^DeepSeek-AI. "DeepSeek-V4.1-Flash: Pushing the Limits of KV Cache Compression." Hugging Face model card, September 10, 2026. huggingface.co/...DeepSeek-V4.1-Flash
- ^DeepSeek-AI. "DeepSeek-V4.1-Flash Technical Report." September 10, 2026. huggingface.co/...DeepSeek_V41_Tech_Report.pdf
- ^DeepSeek-AI. "DeepSeek-V4.1-Flash config.json." Hugging Face, September 10, 2026. huggingface.co/...config.json
- ^DeepSeek. "Introducing DeepSeek-V4.1-Flash." Official announcement thread on X, September 10, 2026. x.com/...2097930608790167907
- ^DeepSeek. "DeepSeek API Updates." Accessed September 10, 2026. api-docs.deepseek.com/updates
- ^DeepSeek. "Models and Pricing." DeepSeek API documentation. Accessed September 10, 2026. api-docs.deepseek.com/...pricing
- ^DeepSeek. "Vision." DeepSeek API documentation. Accessed September 10, 2026. api-docs.deepseek.com/...vision
- ^DeepSeek. "Thinking Mode." DeepSeek API documentation. Accessed September 10, 2026. api-docs.deepseek.com/...thinking_mode
- ^DeepSeek-AI. "DeepSeek-V4.1 Text and Vision Encoding." Hugging Face repository, September 10, 2026. huggingface.co/...README.md
- ^DeepSeek-AI. "Minimal Inference." Hugging Face repository, September 10, 2026. huggingface.co/...README.md
- ^DeepSeek-AI. "Running DeepSWE with dsh-minimal and mini-swe-agent." Hugging Face repository, September 10, 2026. huggingface.co/...README.md
- ^Hugging Face. "deepseek-ai/DeepSeek-V4.1-Flash model metadata." Accessed September 10, 2026. huggingface.co/...DeepSeek-V4.1-Flash
- ^Sun, Yutao, et al. "You Only Cache Once: Decoder-Decoder Architectures for Language Models." Advances in Neural Information Processing Systems 37, 2024. arxiv.org/...2405.05254
- ^Cheng, Xin, et al. "Conditional Memory via Scalable Lookup: A New Axis of Sparsity for Large Language Models." arXiv, 2026. arxiv.org/...2601.07372
- ^Cheng, Xin, et al. "DSpark: Confidence-Scheduled Speculative Decoding with Semi-Autoregressive Generation." arXiv, 2026. arxiv.org/...2607.05147
- ^Merrill, Mike A., et al. "Terminal-Bench: Benchmarking Agents on Hard, Realistic Tasks in Command Line Interfaces." arXiv, 2026. arxiv.org/...2601.11868
- ^DataCurve. "DeepSWE v1.1." Accessed September 10, 2026. deepswe.datacurve.ai
- ^Ding, Jingzhe, et al. "NL2Repo-Bench: Towards Long-Horizon Repository Generation Evaluation of Coding Agents." arXiv, 2025. arxiv.org/...2512.12730
- ^Wang, Zhun, et al. "CyberGym: Evaluating AI Agents' Real-World Cybersecurity Capabilities at Scale." International Conference on Learning Representations, 2026. arxiv.org/...2506.02548
- ^Phan, Long, et al. "Humanity's Last Exam." arXiv, 2025. arxiv.org/...2501.14249
Improve this article
Add missing citations, update stale details, or suggest a clearer explanation. Every suggestion is reviewed for sourcing before it goes live.
v1 · 3,521 words · full history
Fact-checks are independent of edits: a reviewer re-verifies the article against its sources and stamps the date. How we verify
Research and drafting on this wiki are AI-assisted, under named human editorial standards. How AI is used here
Reviewer note: Independently fact-checked against the cited primary, technical, and benchmark sources on September 10, 2026.
Cite this page: AI Wiki. "DeepSeek V4.1-Flash." aiwiki.ai, updated 10 Sept 2026, fact-checked 10 Sept 2026. CC BY 4.0. https://aiwiki.ai/wiki/deepseek_v4_1_flash