AB
AiBoss
project

DeepSeek-V4 - DeepSeek's new generation of large language model series

DeepSeek-V4 is a preview version of DeepSeek's next-generation large language model series, featuring a context window with a capacity of millions of characters and leading performance in the open-source field in terms of agent capabilities, world knowledge, and reasoning capabilities.

What is DeepSeek-V4?

DeepSeek-V4 is a preview version of DeepSeek's next-generation large language model series, boasting a context window of over one million characters and achieving leading levels in the open-source field in terms of agent capabilities, world knowledge, and inference performance. The model includes two versions: deepseek-v4-pro and deepseek-v4-flash, positioned for high performance and cost-effectiveness respectively. Both are open-source and offer API services, supporting both non-thinking and thinking modes, providing a universal infrastructure for long text processing and intelligent agent applications.

Main functions of DeepSeek-V4

  • Million context processingNative support for understanding and remembering ultra-long texts of 1M tokens, a standard feature of official services.
  • Hybrid attention mechanismThe CSA and HCA architectures significantly reduce long context computation and memory overhead.
  • Agent Encoding Enhancement: Deeply optimized for mainstream agent frameworks such as Claude Code and OpenClaw.
  • Dual-mode reasoningSupports both non-thinking and thinking modes, the latter of which can have its intensity adjusted via the reasoning_effort parameter.
  • Multi-domain expert integration: Integrate the expertise of specialists in mathematics, code, agents, and other fields through OPD distillation.
  • Economical and efficient choiceThe Flash version achieves inference performance close to Pro level with lower parameters, and the API cost is significantly reduced.

DeepSeek-V4 Technical Principles

  • CSA Compressed Sparse AttentionThe key-value pairs of each m token are compressed into one entry. The index score is calculated using Lightning Indexer and Top-k sparse selection is performed. The sliding window and Attention Sink mechanisms are combined to preserve local dependencies.
  • HCA's heavy compression of attentionThe KV entries are merged into a single entry with a larger compression ratio m’, maintaining dense attention without employing sparse selection, further reducing computational cost.
  • mHC manifold-constrained hyperlinksThe residual mapping matrix is projected onto a double random matrix manifold using the Sinkhorn-Knopp algorithm, with the spectral norm constrained to not exceed 1, thereby enhancing the stability of deep signal propagation.
  • Muon OptimizerThe model employs a hybrid Newton-Schulz iteration to orthogonalize the gradient matrix, with two phases: fast convergence and precise stabilization, supporting efficient training of large-scale MoE models.
  • FP4 Quantization Perception TrainingFP4 quantization is performed on the MoE expert weights and the CSA indexer QK path, and lossless inverse quantization is achieved by extending the dynamic range with FP8, thereby reducing memory and computational overhead.

Performance of DeepSeek-V4

  • Knowledge and Ability
    • World-leading open source knowledgeSimpleQA-Verified achieved a score of 57.9%, surpassing all evaluated open-source models by 20 percentage points, and only slightly behind Gemini-3.1-Pro (75.6%).
    • Chinese knowledge is prominentChinese-SimpleQA reached 84.4%, significantly outperforming K2.6 (75.9%) and GLM-5.1 (75.0%).
    • Educational knowledge is at the forefrontMMLU-Pro 87.5%, GPQA Diamond 90.1%, on par with GPT-5.4, and slightly lower than Gemini-3.1-Pro.
  • Reasoning and coding skills
    • Mathematics competitions rival closed-sourceHMMT February 2026 achieved 95.2%, and IMO AnswerBench achieved 89.8%, surpassing K2.6 and GLM-5.1, and approaching GPT-5.4 and Opus-4.6.
    • For the first time, the open-source code competition has caught up with the closed-source code competition.His Codeforces Rating is 3206, which is comparable to GPT-5.4 (3168), and he is currently ranked 23rd among human players.
    • Breakthrough in high-difficulty reasoningApex Shortlist achieved a score of 90.2%, surpassing GPT-5.4 (78.1%) and Opus-4.6 (85.9%); LiveCodeBench achieved a score of 93.5%, leading all comparison models.
  • Agent capabilities
    • Software engineering is close to top-level closed source.SWE Verified reached 80.6%, roughly the same as Opus-4.6 (80.8%); SWE Pro reached 55.4% and SWE Multilingual reached 76.2%.
    • Leading Open Source Terminal OperationTerminal Bench 2.0 achieved a score of 67.9%, surpassing K2.6 (66.7%), GLM-5.1 (63.5%), and Opus-4.6 (65.4%).
    • Excellent generalization of tool callsMCP Atlas Public (73.6%) and Toolathlon (51.8%) performed exceptionally well in the evaluation, which included a wide range of tools and MCP services.
  • Long context capability
    • Powerful contextual searchThe MRCR reaches 83.5% within 1M, surpassing Gemini-3.1-Pro (76.3%); the search performance is highly stable within 128K and still maintains strong capabilities at 1M.
    • Real-world long document understandingCorpusQA 1M achieved 62.0%, outperforming Gemini-3.1-Pro (53.8%).
  • Efficiency performance
    • The computational load dropped precipitously.In the 1M context, V4-Pro's single-token inference FLOPs are only 27% of V3.2's, and V4-Flash's are only 10%.
    • KV cache significantly compressedIn a 1M context, V4-Pro's cumulative KV cache is 10% of V3.2's, while V4-Flash's is only 7%.
    • Router Expert FP4 QuantizationThe expert weights use FP4 storage, which theoretically could improve efficiency by another 1/3 in the future hardware implementation.

How to use DeepSeek-V4

  • Web/AppVisit the DeepSeek website or official app and select either Expert Mode (Pro) or Quick Mode (Flash).
  • API calls: Modify the model parameter todeepseek-v4-proordeepseek-v4-flashThe base_url remains unchanged.
  • Thinking patternsFor complex agent scenarios, it is recommended to enable the thinking mode and set it.reasoning_effort: max.
  • Local deployment: Download open-source weights via Hugging Face or ModelScope and deploy them yourself.

Key information and usage requirements for DeepSeek-V4

  • Version SpecificationsThe Pro version uses 1.6T parameters/49B activation, and the Flash version uses 284B parameters/13B activation. The pre-training data are 33T and 32T respectively.
  • Context lengthBoth versions support 1M Tokens, old interfacedeepseek-chatanddeepseek-reasonerIt will be discontinued on July 24, 2026.
  • API pricing (per million tokens)Pro input cache hits 1 yuan / misses 12 yuan, outputs 24 yuan; Flash input cache hits 0.2 yuan / misses 1 yuan, outputs 2 yuan.
  • Computing power limitThe Pro version currently has limited service throughput, and the price is expected to drop significantly after the Ascend 950 supernode is launched in batches in the second half of the year.

DeepSeek-V4's core advantages

  • Millions of contexts for universal accessThe 1M Token ultra-long context has become a standard feature of the official service, breaking through the secondary calculation bottleneck of the traditional attention mechanism, making scaling during long text tasks and testing truly feasible.
  • Extreme long context efficiencyBy using a hybrid architecture of CSA compressed sparse attention and HCA heavily compressed attention, V4-Pro achieves only 27% of the single-token inference FLOPs of V3.2 in a 1M context, with KV caching at only 10%, and even lower at 10% and 7% in the Flash version.
  • New benchmark for open source model performanceV4-Pro-Max outperforms previous open-source models in all evaluations, including knowledge, reasoning, and code competitions. Its agent coding capabilities are better than Claude Sonnet 4.5 in internal evaluations, and its delivery quality is close to that of Opus 4.6 in non-thinking mode.
  • Dual version flexible coverageThe Pro version (1.6T/49B) is positioned as the top-performing version, while the Flash version (284B/13B) achieves near-inference capabilities with extremely small activation parameters. The API price is as low as 1/12 of the Pro version, making it affordable for different budget scenarios.
  • Agent capabilities natively enhancedSpecifically optimized for mainstream agent frameworks such as Claude Code and OpenClaw, it supports coherent reasoning preservation across user message boundaries and performs excellently in agent evaluations such as SWE and Terminal Bench.

DeepSeek-V4 project address

  • HuggingFace model libraryhttps://huggingface.co/collections/deepseek-ai/deepseek-v4
  • Technical Papers: https://huggingface.co/deepseek-ai/DeepSeek-V4-Pro/blob/main/DeepSeek_V4.pdf

Comparison of DeepSeek-V4 with similar competing products

Comparison Dimensions DeepSeek-V4-Pro Claude Opus 4.6 Kimi K2.6
Model localization Open source high-performance MoE Closed-source top-level general purpose Open source agent intelligence
Open source status Fully open source Closed-source API Open source/open API
Total number of parameters 1.6T Not disclosed Not disclosed
Activation parameters 49B Not disclosed Not disclosed
Context length 1M Token 200K 1M Token
Core Architecture CSA+HCA Hybrid Attention Traditional Transformer MoE+ Long Context
MMLU-Pro 87.5 89.1 87.1
SimpleQA 57.9 46.2 36.9
Codeforces 3206
SWE Verified 80.6 80.8 80.2
Terminal Bench 67.9 65.4 66.7
MRCR 1M 83.5 92.9
API Input Price 12 yuan/million tokens Approximately 150 RMB per million tokens Approximately 60 yuan per million tokens
Long context efficiency The KV cache is only 10% of that in V3.2. Standard KV Cache Highly efficient, but details not disclosed.

Application scenarios of DeepSeek-V4

  • Long document analysisSupports full-text comprehension and cross-chapter reasoning for papers, reports, and legal contracts with millions of words.
  • Intelligent agent codingPerform complex code generation, refactoring, and debugging tasks within frameworks such as Claude Code and OpenClaw.
  • Multi-round tool callsIt preserves the complete inference history in the Agent workflow, supporting coherent thinking across user message boundaries.
  • Knowledge-intensive question answeringIt significantly outperforms open-source models in global knowledge assessment and is suitable for education, research, and professional consulting.
  • White-collar office tasksThe model performs excellently in scenarios such as Chinese writing, information analysis, document generation and editing.