Rooc commited on
Commit
da0cf7f
·
verified ·
1 Parent(s): 0bdc7f5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +57 -57
README.md CHANGED
@@ -2,7 +2,7 @@
2
  license: mit
3
  library_name: transformers
4
  ---
5
- # DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligence
6
 
7
  <!-- markdownlint-disable first-line-h1 -->
8
  <!-- markdownlint-disable html -->
@@ -14,7 +14,7 @@ library_name: transformers
14
  <hr>
15
  <div align="center" style="line-height: 1;">
16
  <a href="https://www.deepseekfr.org/" target="_blank" style="margin: 2px;">
17
- <img alt="Homepage" src="https://github.com/deepseek-ai/DeepSeek-V2/blob/main/figures/badge.svg?raw=true" style="display: inline-block; vertical-align: middle;"/>
18
  </a>
19
  <a href="https://deepseekfr.org/" target="_blank" style="margin: 2px;">
20
  <img alt="Chat" src="https://img.shields.io/badge/🤖%20Chat-DeepSeek%20V4-536af5?color=536af5&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
@@ -30,59 +30,59 @@ library_name: transformers
30
  </div>
31
  <div align="center" style="line-height: 1;">
32
  <a href="LICENSE" style="margin: 2px;">
33
- <img alt="License" src="https://img.shields.io/badge/License-MIT-f5de53?&color=f5de53" style="display: inline-block; vertical-align: middle;"/>
34
  </a>
35
  </div>
36
 
37
  <p align="center">
38
- <a href="https://huggingface.co/deepseek-ai/DeepSeek-V4-Pro/blob/main/DeepSeek_V4.pdf"><b>Technical Report</b>👁️</a>
39
  </p>
40
 
41
  ## Introduction
42
 
43
- We present a preview version of **DeepSeek-V4** series, including two strong Mixture-of-Experts (MoE) language models — **DeepSeek-V4-Pro** with 1.6T parameters (49B activated) and **DeepSeek-V4-Flash** with 284B parameters (13B activated) — both supporting a context length of **one million tokens**.
44
 
45
- DeepSeek-V4 series incorporate several key upgrades in architecture and optimization:
46
 
47
- 1. **Hybrid Attention Architecture:** We design a hybrid attention mechanism combining Compressed Sparse Attention (CSA) and Heavily Compressed Attention (HCA) to dramatically improve long-context efficiency. In the 1M-token context setting, DeepSeek-V4-Pro requires only **27% of single-token inference FLOPs** and **10% of KV cache** compared with DeepSeek-V3.2.
48
- 2. **Manifold-Constrained Hyper-Connections (mHC):** We incorporate mHC to strengthen conventional residual connections, enhancing stability of signal propagation across layers while preserving model expressivity.
49
- 3. **Muon Optimizer:** We employ the Muon optimizer for faster convergence and greater training stability.
50
 
51
- We pre-train both models on more than **32T** diverse and high-quality tokens, followed by a comprehensive post-training pipeline. The post-training features a two-stage paradigm: independent cultivation of domain-specific experts (through SFT and RL with GRPO), followed by unified model consolidation via on-policy distillation, integrating distinct proficiencies across diverse domains into a single model.
52
 
53
- **DeepSeek-V4-Pro-Max**, the maximum reasoning effort mode of DeepSeek-V4-Pro, significantly advances the knowledge capabilities of open-source models, firmly establishing itself as the best open-source model available today. It achieves top-tier performance in coding benchmarks and significantly bridges the gap with leading closed-source models on reasoning and agentic tasks. Meanwhile, **DeepSeek-V4-Flash-Max** achieves comparable reasoning performance to the Pro version when given a larger thinking budget, though its smaller parameter scale naturally places it slightly behind on pure knowledge tasks and the most complex agentic workflows.
54
 
55
  <div align="center">
56
  <img src="assets/dsv4_performance.png" >
57
  </div>
58
 
59
- ## Model Downloads
60
 
61
  <div align="center">
62
 
63
- | **Model** | **#Total Params** | **#Activated Params** | **Context Length** | **Precision** | **Download** |
64
  | :---: | :---: | :---: | :---: | :---: | :---: |
65
- | DeepSeek-V4-Flash-Base | 284B | 13B | 1M | FP8 Mixed | [HuggingFace](https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash-Base) \| [ModelScope](https://modelscope.cn/models/deepseek-ai/DeepSeek-V4-Flash-Base) |
66
- | DeepSeek-V4-Flash | 284B | 13B | 1M | FP4 + FP8 Mixed* | [HuggingFace](https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash) \| [ModelScope](https://modelscope.cn/models/deepseek-ai/DeepSeek-V4-Flash) |
67
- | DeepSeek-V4-Pro-Base | 1.6T | 49B | 1M | FP8 Mixed | [HuggingFace](https://huggingface.co/deepseek-ai/DeepSeek-V4-Pro-Base) \| [ModelScope](https://modelscope.cn/models/deepseek-ai/DeepSeek-V4-Pro-Base) |
68
- | DeepSeek-V4-Pro | 1.6T | 49B | 1M | FP4 + FP8 Mixed* | [HuggingFace](https://huggingface.co/deepseek-ai/DeepSeek-V4-Pro) \| [ModelScope](https://modelscope.cn/models/deepseek-ai/DeepSeek-V4-Pro) |
69
 
70
  </div>
71
 
72
- *\*FP4 + FP8 Mixed: MoE expert parameters use FP4 precision; most other parameters use FP8.*
73
 
74
- ## Evaluation Results
75
 
76
- ### Base Model
77
 
78
  <div align="center">
79
 
80
- | Benchmark (Metric) | # Shots | DeepSeek-V3.2-Base | DeepSeek-V4-Flash-Base | DeepSeek-V4-Pro-Base |
81
  | :--- | :---: | :---: | :---: | :---: |
82
  | Architecture | - | MoE | MoE | MoE |
83
- | # Activated Params | - | 37B | 13B | 49B |
84
- | # Total Params | - | 671B | 284B | 1.6T |
85
- | **World Knowledge** | | | | |
86
  | AGIEval (EM) | 0-shot | 80.1 | 82.6 | **83.1** |
87
  | MMLU (EM) | 5-shot | 87.8 | 88.7 | **90.1** |
88
  | MMLU-Redux (EM) | 5-shot | 87.5 | 89.4 | **90.8** |
@@ -95,41 +95,41 @@ We pre-train both models on more than **32T** diverse and high-quality tokens, f
95
  | SuperGPQA (EM) | 5-shot | 45.0 | 46.5 | **53.9** |
96
  | FACTS Parametric (EM) | 25-shot | 27.1 | 33.9 | **62.6** |
97
  | TriviaQA (EM) | 5-shot | 83.3 | 82.8 | **85.6** |
98
- | **Language & Reasoning** | | | | |
99
  | BBH (EM) | 3-shot | **87.6** | 86.9 | 87.5 |
100
  | DROP (F1) | 1-shot | 88.2 | 88.6 | **88.7** |
101
  | HellaSwag (EM) | 0-shot | 86.4 | 85.7 | **88.0** |
102
  | WinoGrande (EM) | 0-shot | 78.9 | 79.5 | **81.5** |
103
  | CLUEWSC (EM) | 5-shot | 83.5 | 82.2 | **85.2** |
104
- | **Code & Math** | | | | |
105
  | BigCodeBench (Pass@1) | 3-shot | **63.9** | 56.8 | 59.2 |
106
  | HumanEval (Pass@1) | 0-shot | 62.8 | 69.5 | **76.8** |
107
  | GSM8K (EM) | 8-shot | 91.1 | 90.8 | **92.6** |
108
  | MATH (EM) | 4-shot | 60.5 | 57.4 | **64.5** |
109
  | MGSM (EM) | 8-shot | 81.3 | **85.7** | 84.4 |
110
  | CMath (EM) | 3-shot | 92.6 | **93.6** | 90.9 |
111
- | **Long Context** | | | | |
112
  | LongBench-V2 (EM) | 1-shot | 40.2 | 44.7 | **51.5** |
113
 
114
  </div>
115
 
116
- ### Instruct Model
117
 
118
- DeepSeek-V4-Pro and DeepSeek-V4-Flash both support three reasoning effort modes:
119
 
120
- | Reasoning Mode | Characteristics | Typical Use Cases | Response Format |
121
  | :--- | :--- | :--- | :--- |
122
- | Non-think | Fast, intuitive responses | Routine daily tasks, low-risk decisions | `</think>` summary |
123
- | Think High | Conscious logical analysis, slower but more accurate | Complex problem-solving, planning | `<think>` thinking `</think>` summary |
124
- | Think Max | Push reasoning to its fullest extent | Exploring the boundary of model reasoning capability | Special system prompt + `<think>` thinking `</think>` summary |
125
 
126
- #### DeepSeek-V4-Pro-Max vs Frontier Models
127
 
128
  <div align="center">
129
 
130
- | Benchmark (Metric) | Opus-4.6 Max | GPT-5.4 xHigh | Gemini-3.1-Pro High | K2.6 Thinking | GLM-5.1 Thinking | DS-V4-Pro Max |
131
  | :--- | :---: | :---: | :---: | :---: | :---: | :---: |
132
- | **Knowledge & Reasoning** | | | | | | |
133
  | MMLU-Pro (EM) | 89.1 | 87.5 | **91.0** | 87.1 | 86.0 | 87.5 |
134
  | SimpleQA-Verified (Pass@1) | 46.2 | 45.3 | **75.6** | 36.9 | 38.1 | 57.9 |
135
  | Chinese-SimpleQA (Pass@1) | 76.4 | 76.8 | **85.9** | 75.9 | 75.0 | 84.4 |
@@ -141,10 +141,10 @@ DeepSeek-V4-Pro and DeepSeek-V4-Flash both support three reasoning effort modes:
141
  | IMOAnswerBench (Pass@1) | 75.3 | **91.4** | 81.0 | 86.0 | 83.8 | 89.8 |
142
  | Apex (Pass@1) | 34.5 | 54.1 | **60.9** | 24.0 | 11.5 | 38.3 |
143
  | Apex Shortlist (Pass@1) | 85.9 | 78.1 | 89.1 | 75.5 | 72.4 | **90.2** |
144
- | **Long Context** | | | | | | |
145
  | MRCR 1M (MMR) | **92.9** | - | 76.3 | - | - | 83.5 |
146
  | CorpusQA 1M (ACC) | **71.7** | - | 53.8 | - | - | 62.0 |
147
- | **Agentic** | | | | | | |
148
  | Terminal Bench 2.0 (Acc) | 65.4 | **75.1** | 68.5 | 66.7 | 63.5 | 67.9 |
149
  | SWE Verified (Resolved) | **80.8** | - | 80.6 | 80.2 | - | 80.6 |
150
  | SWE Pro (Resolved) | 57.3 | 57.7 | 54.2 | **58.6** | 58.4 | 55.4 |
@@ -157,13 +157,13 @@ DeepSeek-V4-Pro and DeepSeek-V4-Flash both support three reasoning effort modes:
157
 
158
  </div>
159
 
160
- #### Comparison across Modes
161
 
162
  <div align="center">
163
 
164
- | Benchmark (Metric) | V4-Flash Non-Think | V4-Flash High | V4-Flash Max | V4-Pro Non-Think | V4-Pro High | V4-Pro Max |
165
  | :--- | :---: | :---: | :---: | :---: | :---: | :---: |
166
- | **Knowledge & Reasoning** | | | | | | |
167
  | MMLU-Pro (EM) | 83.0 | 86.4 | 86.2 | 82.9 | 87.1 | **87.5** |
168
  | SimpleQA-Verified (Pass@1) | 23.1 | 28.9 | 34.1 | 45.0 | 46.2 | **57.9** |
169
  | Chinese-SimpleQA (Pass@1) | 71.5 | 73.2 | 78.9 | 75.8 | 77.7 | **84.4** |
@@ -175,10 +175,10 @@ DeepSeek-V4-Pro and DeepSeek-V4-Flash both support three reasoning effort modes:
175
  | IMOAnswerBench (Pass@1) | 41.9 | 85.1 | 88.4 | 35.3 | 88.0 | **89.8** |
176
  | Apex (Pass@1) | 1.0 | 19.1 | 33.0 | 0.4 | 27.4 | **38.3** |
177
  | Apex Shortlist (Pass@1) | 9.3 | 72.1 | 85.7 | 9.2 | 85.5 | **90.2** |
178
- | **Long Context** | | | | | | |
179
  | MRCR 1M (MMR) | 37.5 | 76.9 | 78.7 | 44.7 | 83.3 | **83.5** |
180
  | CorpusQA 1M (ACC) | 15.5 | 59.3 | 60.5 | 35.6 | 56.5 | **62.0** |
181
- | **Agentic** | | | | | | |
182
  | Terminal Bench 2.0 (Acc) | 49.1 | 56.6 | 56.9 | 59.1 | 63.3 | **67.9** |
183
  | SWE Verified (Resolved) | 73.7 | 78.6 | 79.0 | 73.6 | 79.4 | **80.6** |
184
  | SWE Pro (Resolved) | 49.1 | 52.3 | 52.6 | 52.1 | 54.4 | **55.4** |
@@ -191,45 +191,45 @@ DeepSeek-V4-Pro and DeepSeek-V4-Flash both support three reasoning effort modes:
191
 
192
  </div>
193
 
194
- ## Chat Template
195
 
196
- This release does not include a Jinja-format chat template. Instead, we provide a dedicated `encoding` folder with Python scripts and test cases demonstrating how to encode messages in OpenAI-compatible format into input strings for the model, and how to parse the model's text output. Please refer to the [`encoding`](encoding/README.md) folder for full documentation.
197
 
198
- A brief example:
199
 
200
  ```python
201
  from encoding_dsv4 import encode_messages, parse_message_from_completion_text
202
 
203
  messages = [
204
- {"role": "user", "content": "hello"},
205
- {"role": "assistant", "content": "Hello! I am DeepSeek.", "reasoning_content": "thinking..."},
206
  {"role": "user", "content": "1+1=?"}
207
  ]
208
 
209
- # messages -> string
210
  prompt = encode_messages(messages, thinking_mode="thinking")
211
 
212
- # string -> tokens
213
  import transformers
214
  tokenizer = transformers.AutoTokenizer.from_pretrained("deepseek-ai/DeepSeek-V4-Pro")
215
  tokens = tokenizer.encode(prompt)
216
  ```
217
 
218
- ## How to Run Locally
219
 
220
- Please refer to the [inference](inference/README.md) folder for detailed instructions on running DeepSeek-V4 locally, including model weight conversion and interactive chat demos.
221
 
222
- For local deployment, we recommend setting the sampling parameters to `temperature = 1.0, top_p = 1.0`. For the Think Max reasoning mode, we recommend setting the context window to at least **384K** tokens.
223
 
224
- ## License
225
 
226
- This repository and the model weights are licensed under the [MIT License](LICENSE).
227
 
228
  ## Citation
229
 
230
  ```
231
  @misc{deepseekai2026deepseekv4,
232
- title={DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligence},
233
  author={DeepSeek-AI},
234
  year={2026},
235
  }
@@ -237,4 +237,4 @@ This repository and the model weights are licensed under the [MIT License](LICEN
237
 
238
  ## Contact
239
 
240
- If you have any questions, please raise an issue or contact us at [service@deepseek.com](service@deepseek.com).
 
2
  license: mit
3
  library_name: transformers
4
  ---
5
+ # DeepSeek-V4 : vers une intelligence à très grande efficacité avec un contexte d’un million de tokens
6
 
7
  <!-- markdownlint-disable first-line-h1 -->
8
  <!-- markdownlint-disable html -->
 
14
  <hr>
15
  <div align="center" style="line-height: 1;">
16
  <a href="https://www.deepseekfr.org/" target="_blank" style="margin: 2px;">
17
+ <img alt="Page d’accueil" src="https://github.com/deepseek-ai/DeepSeek-V2/blob/main/figures/badge.svg?raw=true" style="display: inline-block; vertical-align: middle;"/>
18
  </a>
19
  <a href="https://deepseekfr.org/" target="_blank" style="margin: 2px;">
20
  <img alt="Chat" src="https://img.shields.io/badge/🤖%20Chat-DeepSeek%20V4-536af5?color=536af5&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
 
30
  </div>
31
  <div align="center" style="line-height: 1;">
32
  <a href="LICENSE" style="margin: 2px;">
33
+ <img alt="Licence" src="https://img.shields.io/badge/License-MIT-f5de53?&color=f5de53" style="display: inline-block; vertical-align: middle;"/>
34
  </a>
35
  </div>
36
 
37
  <p align="center">
38
+ <a href="https://huggingface.co/deepseek-ai/DeepSeek-V4-Pro/blob/main/DeepSeek_V4.pdf"><b>Rapport technique</b>👁️</a>
39
  </p>
40
 
41
  ## Introduction
42
 
43
+ Nous présentons une version préliminaire de la série **DeepSeek-V4**, comprenant deux puissants modèles de langage Mixture-of-Experts (MoE) — **DeepSeek-V4-Pro** avec 1,6T de paramètres (49B activés) et **DeepSeek-V4-Flash** avec 284B de paramètres (13B activés) — tous deux prenant en charge une longueur de contexte d’**un million de tokens**.
44
 
45
+ La série DeepSeek-V4 intègre plusieurs améliorations clés en matière d’architecture et d’optimisation :
46
 
47
+ 1. **Architecture d’attention hybride :** nous concevons un mécanisme d’attention hybride combinant Compressed Sparse Attention (CSA) et Heavily Compressed Attention (HCA) afin d’améliorer de façon spectaculaire l’efficacité sur les longs contextes. Dans le cadre d’un contexte de 1M de tokens, DeepSeek-V4-Pro ne nécessite que **27 % des FLOPs d’inférence à token unique** et **10 % du KV cache** par rapport à DeepSeek-V3.2.
48
+ 2. **Hyperconnexions contraintes par variété (mHC) :** nous intégrons les mHC pour renforcer les connexions résiduelles conventionnelles, améliorant la stabilité de la propagation du signal à travers les couches tout en préservant l’expressivité du modèle.
49
+ 3. **Optimiseur Muon :** nous utilisons l’optimiseur Muon pour une convergence plus rapide et une meilleure stabilité d’entraînement.
50
 
51
+ Nous pré-entraînons les deux modèles sur plus de **32T** de tokens diversifiés et de haute qualité, puis appliquons une chaîne complète de post-entraînement. Le post-entraînement suit un paradigme en deux étapes : culture indépendante d’experts spécifiques à chaque domaine (via SFT et RL avec GRPO), puis consolidation unifiée du modèle par distillation on-policy, intégrant des compétences distinctes de divers domaines dans un seul modèle.
52
 
53
+ **DeepSeek-V4-Pro-Max**, le mode de raisonnement à effort maximal de DeepSeek-V4-Pro, fait progresser de manière significative les capacités de connaissance des modèles open source, s’imposant fermement comme le meilleur modèle open source disponible aujourd’hui. Il atteint des performances de tout premier plan sur les benchmarks de code et réduit fortement l’écart avec les principaux modèles fermés sur les tâches de raisonnement et les tâches agentiques. Parallèlement, **DeepSeek-V4-Flash-Max** obtient des performances de raisonnement comparables à la version Pro lorsqu’on lui accorde un budget de réflexion plus important, bien que sa taille de paramètres plus réduite le place naturellement légèrement derrière sur les tâches de connaissance pure et les flux de travail agentiques les plus complexes.
54
 
55
  <div align="center">
56
  <img src="assets/dsv4_performance.png" >
57
  </div>
58
 
59
+ ## Téléchargement des modèles
60
 
61
  <div align="center">
62
 
63
+ | **Modèle** | **# Paramètres totaux** | **# Paramètres activés** | **Longueur de contexte** | **Précision** | **Téléchargement** |
64
  | :---: | :---: | :---: | :---: | :---: | :---: |
65
+ | DeepSeek-V4-Flash-Base | 284B | 13B | 1M | FP8 mixte | [HuggingFace](https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash-Base) \| [ModelScope](https://modelscope.cn/models/deepseek-ai/DeepSeek-V4-Flash-Base) |
66
+ | DeepSeek-V4-Flash | 284B | 13B | 1M | FP4 + FP8 mixte* | [HuggingFace](https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash) \| [ModelScope](https://modelscope.cn/models/deepseek-ai/DeepSeek-V4-Flash) |
67
+ | DeepSeek-V4-Pro-Base | 1.6T | 49B | 1M | FP8 mixte | [HuggingFace](https://huggingface.co/deepseek-ai/DeepSeek-V4-Pro-Base) \| [ModelScope](https://modelscope.cn/models/deepseek-ai/DeepSeek-V4-Pro-Base) |
68
+ | DeepSeek-V4-Pro | 1.6T | 49B | 1M | FP4 + FP8 mixte* | [HuggingFace](https://huggingface.co/deepseek-ai/DeepSeek-V4-Pro) \| [ModelScope](https://modelscope.cn/models/deepseek-ai/DeepSeek-V4-Pro) |
69
 
70
  </div>
71
 
72
+ *\*FP4 + FP8 mixte : les paramètres des experts MoE utilisent la précision FP4 ; la plupart des autres paramètres utilisent FP8.*
73
 
74
+ ## Résultats d’évaluation
75
 
76
+ ### Modèle de base
77
 
78
  <div align="center">
79
 
80
+ | Benchmark (Métrique) | # Shots | DeepSeek-V3.2-Base | DeepSeek-V4-Flash-Base | DeepSeek-V4-Pro-Base |
81
  | :--- | :---: | :---: | :---: | :---: |
82
  | Architecture | - | MoE | MoE | MoE |
83
+ | # Paramètres activés | - | 37B | 13B | 49B |
84
+ | # Paramètres totaux | - | 671B | 284B | 1.6T |
85
+ | **Connaissances générales** | | | | |
86
  | AGIEval (EM) | 0-shot | 80.1 | 82.6 | **83.1** |
87
  | MMLU (EM) | 5-shot | 87.8 | 88.7 | **90.1** |
88
  | MMLU-Redux (EM) | 5-shot | 87.5 | 89.4 | **90.8** |
 
95
  | SuperGPQA (EM) | 5-shot | 45.0 | 46.5 | **53.9** |
96
  | FACTS Parametric (EM) | 25-shot | 27.1 | 33.9 | **62.6** |
97
  | TriviaQA (EM) | 5-shot | 83.3 | 82.8 | **85.6** |
98
+ | **Langage & raisonnement** | | | | |
99
  | BBH (EM) | 3-shot | **87.6** | 86.9 | 87.5 |
100
  | DROP (F1) | 1-shot | 88.2 | 88.6 | **88.7** |
101
  | HellaSwag (EM) | 0-shot | 86.4 | 85.7 | **88.0** |
102
  | WinoGrande (EM) | 0-shot | 78.9 | 79.5 | **81.5** |
103
  | CLUEWSC (EM) | 5-shot | 83.5 | 82.2 | **85.2** |
104
+ | **Code & mathématiques** | | | | |
105
  | BigCodeBench (Pass@1) | 3-shot | **63.9** | 56.8 | 59.2 |
106
  | HumanEval (Pass@1) | 0-shot | 62.8 | 69.5 | **76.8** |
107
  | GSM8K (EM) | 8-shot | 91.1 | 90.8 | **92.6** |
108
  | MATH (EM) | 4-shot | 60.5 | 57.4 | **64.5** |
109
  | MGSM (EM) | 8-shot | 81.3 | **85.7** | 84.4 |
110
  | CMath (EM) | 3-shot | 92.6 | **93.6** | 90.9 |
111
+ | **Long contexte** | | | | |
112
  | LongBench-V2 (EM) | 1-shot | 40.2 | 44.7 | **51.5** |
113
 
114
  </div>
115
 
116
+ ### Modèle Instruct
117
 
118
+ DeepSeek-V4-Pro et DeepSeek-V4-Flash prennent tous deux en charge trois modes d’effort de raisonnement :
119
 
120
+ | Mode de raisonnement | Caractéristiques | Cas d’usage typiques | Format de réponse |
121
  | :--- | :--- | :--- | :--- |
122
+ | Non-think | Réponses rapides et intuitives | Tâches quotidiennes routinières, décisions à faible risque | résumé `</think>` |
123
+ | Think High | Analyse logique consciente, plus lente mais plus précise | Résolution de problèmes complexes, planification | `</think>` résumé de la réflexion |
124
+ | Think Max | Pousse le raisonnement à son niveau maximal | Explorer la limite des capacités de raisonnement du modèle | prompt système spécial + `<think>` réflexion `</think>` résumé |
125
 
126
+ #### DeepSeek-V4-Pro-Max vs modèles de pointe
127
 
128
  <div align="center">
129
 
130
+ | Benchmark (Métrique) | Opus-4.6 Max | GPT-5.4 xHigh | Gemini-3.1-Pro High | K2.6 Thinking | GLM-5.1 Thinking | DS-V4-Pro Max |
131
  | :--- | :---: | :---: | :---: | :---: | :---: | :---: |
132
+ | **Connaissances & raisonnement** | | | | | | |
133
  | MMLU-Pro (EM) | 89.1 | 87.5 | **91.0** | 87.1 | 86.0 | 87.5 |
134
  | SimpleQA-Verified (Pass@1) | 46.2 | 45.3 | **75.6** | 36.9 | 38.1 | 57.9 |
135
  | Chinese-SimpleQA (Pass@1) | 76.4 | 76.8 | **85.9** | 75.9 | 75.0 | 84.4 |
 
141
  | IMOAnswerBench (Pass@1) | 75.3 | **91.4** | 81.0 | 86.0 | 83.8 | 89.8 |
142
  | Apex (Pass@1) | 34.5 | 54.1 | **60.9** | 24.0 | 11.5 | 38.3 |
143
  | Apex Shortlist (Pass@1) | 85.9 | 78.1 | 89.1 | 75.5 | 72.4 | **90.2** |
144
+ | **Long contexte** | | | | | | |
145
  | MRCR 1M (MMR) | **92.9** | - | 76.3 | - | - | 83.5 |
146
  | CorpusQA 1M (ACC) | **71.7** | - | 53.8 | - | - | 62.0 |
147
+ | **Agentique** | | | | | | |
148
  | Terminal Bench 2.0 (Acc) | 65.4 | **75.1** | 68.5 | 66.7 | 63.5 | 67.9 |
149
  | SWE Verified (Resolved) | **80.8** | - | 80.6 | 80.2 | - | 80.6 |
150
  | SWE Pro (Resolved) | 57.3 | 57.7 | 54.2 | **58.6** | 58.4 | 55.4 |
 
157
 
158
  </div>
159
 
160
+ #### Comparaison entre les modes
161
 
162
  <div align="center">
163
 
164
+ | Benchmark (Métrique) | V4-Flash Non-Think | V4-Flash High | V4-Flash Max | V4-Pro Non-Think | V4-Pro High | V4-Pro Max |
165
  | :--- | :---: | :---: | :---: | :---: | :---: | :---: |
166
+ | **Connaissances & raisonnement** | | | | | | |
167
  | MMLU-Pro (EM) | 83.0 | 86.4 | 86.2 | 82.9 | 87.1 | **87.5** |
168
  | SimpleQA-Verified (Pass@1) | 23.1 | 28.9 | 34.1 | 45.0 | 46.2 | **57.9** |
169
  | Chinese-SimpleQA (Pass@1) | 71.5 | 73.2 | 78.9 | 75.8 | 77.7 | **84.4** |
 
175
  | IMOAnswerBench (Pass@1) | 41.9 | 85.1 | 88.4 | 35.3 | 88.0 | **89.8** |
176
  | Apex (Pass@1) | 1.0 | 19.1 | 33.0 | 0.4 | 27.4 | **38.3** |
177
  | Apex Shortlist (Pass@1) | 9.3 | 72.1 | 85.7 | 9.2 | 85.5 | **90.2** |
178
+ | **Long contexte** | | | | | | |
179
  | MRCR 1M (MMR) | 37.5 | 76.9 | 78.7 | 44.7 | 83.3 | **83.5** |
180
  | CorpusQA 1M (ACC) | 15.5 | 59.3 | 60.5 | 35.6 | 56.5 | **62.0** |
181
+ | **Agentique** | | | | | | |
182
  | Terminal Bench 2.0 (Acc) | 49.1 | 56.6 | 56.9 | 59.1 | 63.3 | **67.9** |
183
  | SWE Verified (Resolved) | 73.7 | 78.6 | 79.0 | 73.6 | 79.4 | **80.6** |
184
  | SWE Pro (Resolved) | 49.1 | 52.3 | 52.6 | 52.1 | 54.4 | **55.4** |
 
191
 
192
  </div>
193
 
194
+ ## Modèle de chat
195
 
196
+ Cette version ne comprend pas de modèle de chat au format Jinja. À la place, nous fournissons un dossier `encoding` dédié contenant des scripts Python et des cas de test montrant comment encoder des messages au format compatible OpenAI en chaînes d’entrée pour le modèle, et comment parser la sortie texte du modèle. Veuillez consulter le dossier [`encoding`](encoding/README.md) pour la documentation complète.
197
 
198
+ Un bref exemple :
199
 
200
  ```python
201
  from encoding_dsv4 import encode_messages, parse_message_from_completion_text
202
 
203
  messages = [
204
+ {"role": "user", "content": "bonjour"},
205
+ {"role": "assistant", "content": "Bonjour ! Je suis DeepSeek.", "reasoning_content": "réflexion..."},
206
  {"role": "user", "content": "1+1=?"}
207
  ]
208
 
209
+ # messages -> chaîne
210
  prompt = encode_messages(messages, thinking_mode="thinking")
211
 
212
+ # chaîne -> tokens
213
  import transformers
214
  tokenizer = transformers.AutoTokenizer.from_pretrained("deepseek-ai/DeepSeek-V4-Pro")
215
  tokens = tokenizer.encode(prompt)
216
  ```
217
 
218
+ ## Comment l’exécuter en local
219
 
220
+ Veuillez consulter le dossier [inference](inference/README.md) pour des instructions détaillées sur l’exécution locale de DeepSeek-V4, y compris la conversion des poids du modèle et les démonstrations de chat interactif.
221
 
222
+ Pour un déploiement local, nous recommandons de régler les paramètres d’échantillonnage sur `temperature = 1.0, top_p = 1.0`. Pour le mode de raisonnement Think Max, nous recommandons d’utiliser une fenêtre de contexte d’au moins **384K** tokens.
223
 
224
+ ## Licence
225
 
226
+ Ce dépôt et les poids du modèle sont sous licence [MIT](LICENSE).
227
 
228
  ## Citation
229
 
230
  ```
231
  @misc{deepseekai2026deepseekv4,
232
+ title={DeepSeek-V4 : vers une intelligence à très grande efficacité avec un contexte d’un million de tokens},
233
  author={DeepSeek-AI},
234
  year={2026},
235
  }
 
237
 
238
  ## Contact
239
 
240
+ Si vous avez des questions, veuillez ouvrir une issue ou nous contacter à l’adresse [service@deepseek.com](service@deepseek.com).