DeepSeek has published the open weights for DeepSeek-V4.1-Flash, alongside the official production snapshot DeepSeek-V4.1-Flash-1017. The release marks a structural evolution for the open-source laboratory, deploying a 552-billion parameter sparse Mixture-of-Experts (MoE) foundation model under the permissive MIT License. Designed specifically for agentic execution, terminal commands, and long-horizon software engineering, the model combines native one-million-token context processing with an asymmetric parameter routing architecture that activates 8 billion parameters during input prefill and 16 billion parameters during token decoding. Weights, code, and evaluation configurations are available on the Hugging Face model repository.

Concurrent with the open-weight upload, the model went live across managed inference providers under the deepseek-flash API alias. Third-party cloud router OpenRouter has deployed the October 17 snapshot across multiple hardware partners, delivering input rates as low as $0.05 per million tokens and output throughput exceeding 160 tokens per second. The architecture directly tackles the primary economic bottleneck of multi-turn autonomous agents: KV cache memory consumption. Through Causal Encoder-Decoder routing and compressed attention, DeepSeek reduces the persistent memory footprint to 890 bytes per token, roughly one quarter of the earlier DeepSeek-V4-Flash generation.
Causal encoder-decoder architecture and KV cache compression
Standard transformer language models process prompts and generate responses through uniform causal decoder layers. DeepSeek-V4.1-Flash departs from this convention by adopting a Causal Encoder-Decoder (CED) structure: a 40-layer Transformer organized into a 20-layer causal encoder followed by a 20-layer decoder. In CED, the decoder global KV cache projects directly from the final encoder hidden states rather than deriving from each decoder layer own intermediate states. This decoupling allows the system to activate only 8B parameters per token during prompt prefill and 16B during decoding, minimizing latency on long system prompts and extensive tool call histories.
To maintain long-context stability up to 1M tokens without exhausting GPU VRAM or saturating host SSD bandwidth, the model incorporates three interlocking cache optimizations:
- Sliding Window Attention Bounded Replay: Reconstructs missing sliding-window KV states by replaying only the most recent tokens, eliminating the requirement to dump intermediate attention states to solid-state storage.
- Compressed Sparse Attention 2 (CSA2): Assigns each attention layer to one of three static modes (Full, Reindex, or Reuse) to share primary KV pairs across layers while recycling sparse attention indices. A Hierarchical Sparse Indexer bounds deeper indexing overhead regardless of context length.
- FP4 Main KV Quantization: Stores global KV representations in microscopic 4-bit floating-point (E2M1 format with one E4M3 scale factor per 16 channels), bringing the global cache footprint down to 890 bytes per token.

Base model specifications and architectural comparison
The table below summarizes the architectural evolution between DeepSeek-V4-Flash-Base, the flagship DeepSeek-V4-Pro-Base, and the new DeepSeek-V4.1-Flash-Base:
| Technical Metric | DeepSeek-V4-Flash-Base | DeepSeek-V4-Pro-Base | DeepSeek-V4.1-Flash-Base |
|---|---|---|---|
| Network Topology | Sparse MoE Decoder | Sparse MoE Decoder | Causal Encoder-Decoder (CED) MoE |
| Total Backbone Parameters | 284B | 1.6T | 552B |
| Activated Parameters per Token | 13B | 49B | 8B (Prefill) / 16B (Decode) |
| Global KV Cache Size | ~3,560 bytes/token | ~4,100 bytes/token | 890 bytes/token (FP4 E2M1) |
| Maximum Context Window | 128K tokens | 1M tokens | 1M tokens (Native) |
| Pre-training Dataset Scale | 25T tokens | 40T tokens | 45T multimodal tokens |
| Vision Ingestion | Post-hoc adaptation (Exp) | Text only | DeepSeek-ViT 2D-RoPE (Native) |
| MMLU-Pro (5-shot, EM) | 68.3% | 73.5% | 74.1% |
| HumanEval (0-shot, Pass@1) | 69.5% | 76.8% | 79.4% |
| BigCodeBench (3-shot, Pass@1) | 56.8% | 59.2% | 60.6% |
| GSM8K (8-shot, EM) | 90.8% | 92.6% | 93.0% |
Agentic software engineering and reasoning evaluations
DeepSeek-V4.1-Flash introduces a variable reasoning effort parameter between 1 and 100. When configured at maximum reasoning capacity (effort=100), the model establishes competitive leads over larger proprietary frontier checkpoints on autonomous engineering tasks:
| Benchmark (Metric) | DeepSeek-V4.1-Flash | Claude Opus 5.0 | GPT-5.6 Sol | DeepSeek-V4-Pro | DeepSeek-V4-Flash |
|---|---|---|---|---|---|
| DeepSWE v1.1 (Resolved %) | 74.2% | 74.0% | 73.0% | 62.7% | 54.4% |
| Terminal-Bench 2.1 (Pass@1) | 90.6% | 89.1% | 88.8% | 87.9% | 82.7% |
| Terminal-Bench 3.0 (Pass@1) | 30.0% | 43.3% | 34.4% | 11.8% | 7.6% |
| Terminal-Bench 4.0 (Pass@1) | 31.2% | 51.8% | 39.9% | 12.4% | 7.0% |
| Codeforces Elo Rating | 3471 | N/A | N/A | 3348 | 3289 |
| CyberGym Security (Pass@1) | 88.1% | N/A | 84.5% | 83.3% | 76.7% |
| SEC-Bench Pro (Pass@1) | 62.8% | N/A | 74.3% | 56.4% | 30.9% |
| AutomationBench (Pass@1) | 54.8% | 50.3% | 45.8% | 43.2% | 37.7% |
| Agent’s Last Exam (Pass@1) | 31.8% | 28.6% | 26.7% | 25.7% | 25.2% |
| HLE with Tools (Pass@1) | 63.9% | 63.6% | N/A | 60.0% | 51.5% |
Native vision integration via DeepSeek-ViT
Unlike early experiments where vision encoders were attached to frozen text backbones, DeepSeek-V4.1-Flash trains visual and textual tokens jointly across its 45T token pre-training run. The visual system relies on DeepSeek-ViT, trained from scratch with two-dimensional rotary position embeddings (2D-RoPE) and a 3×3 pixel-unshuffle downsampling stage that feeds a two-layer MLP projector. This configuration delivers balanced visual perception without inflating token counts on high-resolution diagrams.
On visual benchmarks, the model scores 95.6% on DocVQA, 77.9% on CVBench, and 56.5% on MMMU-Pro under 4-shot evaluation. For visual computer-use and interface agents evaluated via the Claude Code harness with 512k context windows, DeepSeek-V4.1-Flash achieves 89.6% on BabyVision and 78.9% on Chartography, verifying reliable GUI grounding across desktop workflows.
OpenRouter deployment and API economics
The model snapshot is deployed on OpenRouter deployment endpoint under the model slug deepseek/deepseek-v4.1-flash-1017. By routing requests across multiple independent inference providers, the platform maintains 100% availability with competitive token economics:

| Inference Provider | Prompt Input / 1M | Completion Output / 1M | Cache Read / 1M | Throughput | P50 Latency |
|---|---|---|---|---|---|
| inference.net | $0.08 | $0.50 | $0.008 | 165 tps | 0.36 s |
| Relace | $0.05 | $0.60 | $0.008 | 121 tps | 1.10 s |
| DeepInfra (Promotional) | $0.098 | $0.294 | $0.00294 | 120 tps | 0.60 s |
| Cloudflare | $0.10 | $0.60 | $0.003 | 84 tps | 2.02 s |
| DeepSeek Official Direct | $0.15 | $0.60 | $0.003 | 52 tps | 0.92 s |
For engineering teams running deep agent loops, prompt caching read fees of $0.003 to $0.008 per million tokens yield a 95% reduction in repeated context costs. Further ecosystem updates and developer community ratings are indexed on the DeepSeek catalog profile on Ailab.Mobi.
Prompt encoding and production deployment toolkit
The repository omits Jinja2 chat templates due to the complexity of multi-turn tool calling, mid-conversation system injections, and numeric reasoning effort flags. Instead, DeepSeek provides two integration paths for developers:
- Python Reference Implementation (encoding.py): A self-contained script containing canonical test cases for thinking modes, interleaved image content, and multi-turn conversational histories.
- DeepSeek Recipe Rust Toolkit: A high-performance Rust library with Python bindings that translates Messages, Chat Completions, and Responses API payloads into model token IDs. It parses structured model outputs back into client responses while handling streaming events.
For local and self-hosted inference, the team recommends the following decoding parameters: temperature=1.0, top_p=0.95 (or 1.0), and a context allocation of up to 1M tokens with max_tokens set above 256K for complete code patch generation.
FAQ
What is the primary difference between DeepSeek-V4-Flash and V4.1-Flash?
DeepSeek-V4.1-Flash transitions from a conventional decoder MoE to a Causal Encoder-Decoder (CED) architecture with 552B total parameters, activating 8B during prefill and 16B during decoding. It integrates native vision and slashes KV cache memory to 890 bytes per token.
What does the 1017 snapshot designation mean?
The 1017 suffix designates the model checkpoint released on October 17, 2026. This version functions as the default production weight set for both open downloads and API endpoints like OpenRouter.
How does the variable reasoning effort parameter work?
Users can configure reasoning effort as an integer between 1 and 100. Lower values prioritize generation speed and lower token output for simple queries, while maximum effort (100) expands reasoning chains for complex SWE-bench and mathematical tasks.
Is DeepSeek-V4.1-Flash open source?
Yes. The model weights, model card, and prompt encoding libraries are distributed under the permissive MIT License, allowing commercial usage, local hosting, and weight modifications.
What is the API pricing for DeepSeek-V4.1-Flash?
On OpenRouter and managed cloud hosts, pricing begins at $0.05 to $0.15 per million prompt tokens and $0.30 to $0.60 per million completion tokens, with cached context read fees discounted down to $0.003 per million tokens.
What context length does the model support natively?
The model natively supports context windows up to 1,000,000 tokens (1M), trained across a 45-trillion token multimodal dataset.






