bullerwins nielsr HF staff commited on
Commit
f5257a7
·
verified ·
1 Parent(s): 7f81908

Add pipeline tag and library name (#9)

Browse files

- Add pipeline tag and library name (6d90a4c21ac596c6e3eda398bf9bff6defb8e5d7)


Co-authored-by: Niels Rogge <[email protected]>

Files changed (1) hide show
  1. README.md +42 -25
README.md CHANGED
@@ -1,6 +1,9 @@
1
  ---
2
  base_model:
3
  - deepseek-ai/DeepSeek-V3
 
 
 
4
  ---
5
 
6
  **UPDATE Jan 4th 2025: Support for DeepSeek-V3 has been merged, you can now pull from the master branch of llama.cpp. The versions uploaded in this repo are already requanted to support the changes in the tensor names**
@@ -114,7 +117,8 @@ Throughout the entire training process, we did not experience any irrecoverable
114
 
115
  </div>
116
 
117
- **NOTE: The total size of DeepSeek-V3 models on HuggingFace is 685B, which includes 671B of the Main Model weights and 14B of the Multi-Token Prediction (MTP) Module weights.**
 
118
 
119
  To ensure optimal performance and flexibility, we have partnered with open-source communities and hardware vendors to provide multiple ways to run the model locally. For step-by-step guidance, check out Section 6: [How_to Run_Locally](#6-how-to-run-locally).
120
 
@@ -167,12 +171,13 @@ For developers looking to dive deeper, we recommend exploring [README_WEIGHTS.md
167
 
168
  </div>
169
 
170
- Note: Best results are shown in bold. Scores with a gap not exceeding 0.3 are considered to be at the same level. DeepSeek-V3 achieves the best performance on most benchmarks, especially on math and code tasks.
171
- For more evaluation details, please check our paper.
 
172
 
173
  #### Context Window
174
  <p align="center">
175
- <img width="80%" src="https://huggingface.co/deepseek-ai/DeepSeek-V3/resolve/main/figures/niah.png>
176
  </p>
177
 
178
  Evaluation results on the ``Needle In A Haystack`` (NIAH) tests. DeepSeek-V3 performs well across all context window lengths up to **128K**.
@@ -209,17 +214,16 @@ Evaluation results on the ``Needle In A Haystack`` (NIAH) tests. DeepSeek-V3 pe
209
  | | C-Eval (EM) | 78.6 | 79.5 | 86.1 | 61.5 | 76.7 | 76.0 | **86.5** |
210
  | | C-SimpleQA (Correct) | 48.5 | 54.1 | 48.4 | 50.4 | 51.3 | 59.3 | **64.8** |
211
 
212
- Note: All models are evaluated in a configuration that limits the output length to 8K. Benchmarks containing fewer than 1000 samples are tested multiple times using varying temperature settings to derive robust final results. DeepSeek-V3 stands as the best-performing open-source model, and also exhibits competitive performance against frontier closed-source models.
213
-
214
  </div>
215
 
 
 
 
216
 
217
  #### Open Ended Generation Evaluation
218
 
219
  <div align="center">
220
 
221
-
222
-
223
  | Model | Arena-Hard | AlpacaEval 2.0 |
224
  |-------|------------|----------------|
225
  | DeepSeek-V2.5-0905 | 76.2 | 50.5 |
@@ -229,9 +233,11 @@ Note: All models are evaluated in a configuration that limits the output length
229
  | Claude-Sonnet-3.5-1022 | 85.2 | 52.0 |
230
  | DeepSeek-V3 | **85.5** | **70.0** |
231
 
232
- Note: English open-ended conversation evaluations. For AlpacaEval 2.0, we use the length-controlled win rate as the metric.
233
  </div>
234
 
 
 
 
235
 
236
  ## 5. Chat Website & API Platform
237
  You can chat with DeepSeek-V3 on DeepSeek's official website: [chat.deepseek.com](https://chat.deepseek.com/sign_in)
@@ -246,7 +252,7 @@ DeepSeek-V3 can be deployed locally using the following hardware and open-source
246
  2. **SGLang**: Fully support the DeepSeek-V3 model in both BF16 and FP8 inference modes.
247
  3. **LMDeploy**: Enables efficient FP8 and BF16 inference for local and cloud deployment.
248
  4. **TensorRT-LLM**: Currently supports BF16 inference and INT4/8 quantization, with FP8 support coming soon.
249
- 5. **vLLM**: Support DeekSeek-V3 model with FP8 and BF16 modes for tensor parallelism and pipeline parallelism.
250
  6. **AMD GPU**: Enables running the DeepSeek-V3 model on AMD GPUs via SGLang in both BF16 and FP8 modes.
251
  7. **Huawei Ascend NPU**: Supports running DeepSeek-V3 on Huawei Ascend devices.
252
 
@@ -259,10 +265,23 @@ cd inference
259
  python fp8_cast_bf16.py --input-fp8-hf-path /path/to/fp8_weights --output-bf16-hf-path /path/to/bf16_weights
260
  ```
261
 
262
- **NOTE: Huggingface's Transformers has not been directly supported yet.**
 
263
 
264
  ### 6.1 Inference with DeepSeek-Infer Demo (example only)
265
 
 
 
 
 
 
 
 
 
 
 
 
 
266
  #### Model Weights & Demo Code Preparation
267
 
268
  First, clone our DeepSeek-V3 GitHub repository:
@@ -271,18 +290,18 @@ First, clone our DeepSeek-V3 GitHub repository:
271
  git clone https://github.com/deepseek-ai/DeepSeek-V3.git
272
  ```
273
 
274
- Navigate to the `inference` folder and install dependencies listed in `requirements.txt`.
275
 
276
  ```shell
277
  cd DeepSeek-V3/inference
278
  pip install -r requirements.txt
279
  ```
280
 
281
- Download the model weights from HuggingFace, and put them into `/path/to/DeepSeek-V3` folder.
282
 
283
  #### Model Weights Conversion
284
 
285
- Convert HuggingFace model weights to a specific format:
286
 
287
  ```shell
288
  python convert.py --hf-ckpt-path /path/to/DeepSeek-V3 --save-path /path/to/DeepSeek-V3-Demo --n-experts 256 --model-parallel 16
@@ -293,13 +312,13 @@ python convert.py --hf-ckpt-path /path/to/DeepSeek-V3 --save-path /path/to/DeepS
293
  Then you can chat with DeepSeek-V3:
294
 
295
  ```shell
296
- torchrun --nnodes 2 --nproc-per-node 8 generate.py --node-rank $RANK --master-addr $ADDR --ckpt-path /path/to/DeepSeek-V3-Demo --config configs/config_671B.json --interactive --temperature 0.7 --max-new-tokens 200
297
  ```
298
 
299
  Or batch inference on a given file:
300
 
301
  ```shell
302
- torchrun --nnodes 2 --nproc-per-node 8 generate.py --node-rank $RANK --master-addr $ADDR --ckpt-path /path/to/DeepSeek-V3-Demo --config configs/config_671B.json --input-file $FILE
303
  ```
304
 
305
  ### 6.2 Inference with SGLang (recommended)
@@ -308,6 +327,10 @@ torchrun --nnodes 2 --nproc-per-node 8 generate.py --node-rank $RANK --master-ad
308
 
309
  Notably, [SGLang v0.4.1](https://github.com/sgl-project/sglang/releases/tag/v0.4.1) fully supports running DeepSeek-V3 on both **NVIDIA and AMD GPUs**, making it a highly versatile and robust solution.
310
 
 
 
 
 
311
  Here are the launch instructions from the SGLang team: https://github.com/sgl-project/sglang/tree/main/benchmark/deepseek_v3
312
 
313
  ### 6.3 Inference with LMDeploy (recommended)
@@ -320,6 +343,7 @@ For comprehensive step-by-step instructions on running DeepSeek-V3 with LMDeploy
320
 
321
  [TensorRT-LLM](https://github.com/NVIDIA/TensorRT-LLM) now supports the DeepSeek-V3 model, offering precision options such as BF16 and INT4/INT8 weight-only. Support for FP8 is currently in progress and will be released soon. You can access the custom branch of TRTLLM specifically for DeepSeek-V3 support through the following link to experience the new features directly: https://github.com/NVIDIA/TensorRT-LLM/tree/deepseek/examples/deepseek_v3.
322
 
 
323
  ### 6.5 Inference with vLLM (recommended)
324
 
325
  [vLLM](https://github.com/vllm-project/vllm) v0.6.6 supports DeepSeek-V3 inference for FP8 and BF16 modes on both NVIDIA and AMD GPUs. Aside from standard techniques, vLLM offers _pipeline parallelism_ allowing you to run this model on multiple machines connected by networks. For detailed guidance, please refer to the [vLLM instructions](https://docs.vllm.ai/en/latest/serving/distributed_serving.html). Please feel free to follow [the enhancement plan](https://github.com/vllm-project/vllm/issues/11539) as well.
@@ -339,15 +363,8 @@ This code repository is licensed under [the MIT License](LICENSE-CODE). The use
339
  ```
340
  @misc{deepseekai2024deepseekv3technicalreport,
341
  title={DeepSeek-V3 Technical Report},
342
- author={DeepSeek-AI and Aixin Liu and Bei Feng and Bing Xue and Bingxuan Wang and Bochao Wu and Chengda Lu and Chenggang Zhao and Chengqi Deng and Chenyu Zhang and Chong Ruan and Damai Dai and Daya Guo and Dejian Yang and Deli Chen and Dongjie Ji and Erhang Li and Fangyun Lin and Fucong Dai and Fuli Luo and Guangbo Hao and Guanting Chen and Guowei Li and H. Zhang and Han Bao and Hanwei Xu and Haocheng Wang and Haowei Zhang and Honghui Ding and Huajian Xin and Huazuo Gao and Hui Li and Hui Qu and J. L. Cai and Jian Liang and Jianzhong Guo and Jiaqi Ni and Jiashi Li and Jiawei Wang and Jin Chen and Jingchang Chen and Jingyang Yuan and Junjie Qiu and Junlong Li and Junxiao Song and Kai Dong and Kai Hu and Kaige Gao and Kang Guan and Kexin Huang and Kuai Yu and Lean Wang and Lecong Zhang and Lei Xu and Leyi Xia and Liang Zhao and Litong Wang and Liyue Zhang and Meng Li and Miaojun Wang and Mingchuan Zhang and Minghua Zhang and Minghui Tang and Mingming Li and Ning Tian and Panpan Huang and Peiyi Wang and Peng Zhang and Qiancheng Wang and Qihao Zhu and Qinyu Chen and Qiushi Du and R. J. Chen and R. L. Jin and Ruiqi Ge and Ruisong Zhang and Ruizhe Pan and Runji Wang and Runxin Xu and Ruoyu Zhang and Ruyi Chen and S. S. Li and Shanghao Lu and Shangyan Zhou and Shanhuang Chen and Shaoqing Wu and Shengfeng Ye and Shengfeng Ye and Shirong Ma and Shiyu Wang and Shuang Zhou and Shuiping Yu and Shunfeng Zhou and Shuting Pan and T. Wang and Tao Yun and Tian Pei and Tianyu Sun and W. L. Xiao and Wangding Zeng and Wanjia Zhao and Wei An and Wen Liu and Wenfeng Liang and Wenjun Gao and Wenqin Yu and Wentao Zhang and X. Q. Li and Xiangyue Jin and Xianzu Wang and Xiao Bi and Xiaodong Liu and Xiaohan Wang and Xiaojin Shen and Xiaokang Chen and Xiaokang Zhang and Xiaosha Chen and Xiaotao Nie and Xiaowen Sun and Xiaoxiang Wang and Xin Cheng and Xin Liu and Xin Xie and Xingchao Liu and Xingkai Yu and Xinnan Song and Xinxia Shan and Xinyi Zhou and Xinyu Yang and Xinyuan Li and Xuecheng Su and Xuheng Lin and Y. K. Li and Y. Q. Wang and Y. X. Wei and Y. X. Zhu and Yang Zhang and Yanhong Xu and Yanhong Xu and Yanping Huang and Yao Li and Yao Zhao and Yaofeng Sun and Yaohui Li and Yaohui Wang and Yi Yu and Yi Zheng and Yichao Zhang and Yifan Shi and Yiliang Xiong and Ying He and Ying Tang and Yishi Piao and Yisong Wang and Yixuan Tan and Yiyang Ma and Yiyuan Liu and Yongqiang Guo and Yu Wu and Yuan Ou and Yuchen Zhu and Yuduan Wang and Yue Gong and Yuheng Zou and Yujia He and Yukun Zha and Yunfan Xiong and Yunxian Ma and Yuting Yan and Yuxiang Luo and Yuxiang You and Yuxuan Liu and Yuyang Zhou and Z. F. Wu and Z. Z. Ren and Zehui Ren and Zhangli Sha and Zhe Fu and Zhean Xu and Zhen Huang and Zhen Zhang and Zhenda Xie and Zhengyan Zhang and Zhewen Hao and Zhibin Gou and Zhicheng Ma and Zhigang Yan and Zhihong Shao and Zhipeng Xu and Zhiyu Wu and Zhongyu Zhang and Zhuoshu Li and Zihui Gu and Zijia Zhu and Zijun Liu and Zilin Li and Ziwei Xie and Ziyang Song and Ziyi Gao and Zizheng Pan},
343
- year={2024},
344
- eprint={2412.19437},
345
- archivePrefix={arXiv},
346
- primaryClass={cs.CL},
347
- url={https://arxiv.org/abs/2412.19437},
348
- }
349
  ```
350
 
351
  ## 9. Contact
352
- If you have any questions, please raise an issue or contact us at [[email protected]]([email protected]).
353
-
 
1
  ---
2
  base_model:
3
  - deepseek-ai/DeepSeek-V3
4
+ library_name: llama.cpp
5
+ pipeline_tag: text-generation
6
+ license: other
7
  ---
8
 
9
  **UPDATE Jan 4th 2025: Support for DeepSeek-V3 has been merged, you can now pull from the master branch of llama.cpp. The versions uploaded in this repo are already requanted to support the changes in the tensor names**
 
117
 
118
  </div>
119
 
120
+ > [!NOTE]
121
+ > The total size of DeepSeek-V3 models on Hugging Face is 685B, which includes 671B of the Main Model weights and 14B of the Multi-Token Prediction (MTP) Module weights.
122
 
123
  To ensure optimal performance and flexibility, we have partnered with open-source communities and hardware vendors to provide multiple ways to run the model locally. For step-by-step guidance, check out Section 6: [How_to Run_Locally](#6-how-to-run-locally).
124
 
 
171
 
172
  </div>
173
 
174
+ > [!NOTE]
175
+ > Best results are shown in bold. Scores with a gap not exceeding 0.3 are considered to be at the same level. DeepSeek-V3 achieves the best performance on most benchmarks, especially on math and code tasks.
176
+ > For more evaluation details, please check our paper.
177
 
178
  #### Context Window
179
  <p align="center">
180
+ <img width="80%" src="https://huggingface.co/deepseek-ai/DeepSeek-V3/resolve/main/figures/niah.png">
181
  </p>
182
 
183
  Evaluation results on the ``Needle In A Haystack`` (NIAH) tests. DeepSeek-V3 performs well across all context window lengths up to **128K**.
 
214
  | | C-Eval (EM) | 78.6 | 79.5 | 86.1 | 61.5 | 76.7 | 76.0 | **86.5** |
215
  | | C-SimpleQA (Correct) | 48.5 | 54.1 | 48.4 | 50.4 | 51.3 | 59.3 | **64.8** |
216
 
 
 
217
  </div>
218
 
219
+ > [!NOTE]
220
+ > All models are evaluated in a configuration that limits the output length to 8K. Benchmarks containing fewer than 1000 samples are tested multiple times using varying temperature settings to derive robust final results. DeepSeek-V3 stands as the best-performing open-source model, and also exhibits competitive performance against frontier closed-source models.
221
+
222
 
223
  #### Open Ended Generation Evaluation
224
 
225
  <div align="center">
226
 
 
 
227
  | Model | Arena-Hard | AlpacaEval 2.0 |
228
  |-------|------------|----------------|
229
  | DeepSeek-V2.5-0905 | 76.2 | 50.5 |
 
233
  | Claude-Sonnet-3.5-1022 | 85.2 | 52.0 |
234
  | DeepSeek-V3 | **85.5** | **70.0** |
235
 
 
236
  </div>
237
 
238
+ > [!NOTE]
239
+ > English open-ended conversation evaluations. For AlpacaEval 2.0, we use the length-controlled win rate as the metric.
240
+
241
 
242
  ## 5. Chat Website & API Platform
243
  You can chat with DeepSeek-V3 on DeepSeek's official website: [chat.deepseek.com](https://chat.deepseek.com/sign_in)
 
252
  2. **SGLang**: Fully support the DeepSeek-V3 model in both BF16 and FP8 inference modes.
253
  3. **LMDeploy**: Enables efficient FP8 and BF16 inference for local and cloud deployment.
254
  4. **TensorRT-LLM**: Currently supports BF16 inference and INT4/8 quantization, with FP8 support coming soon.
255
+ 5. **vLLM**: Support DeepSeek-V3 model with FP8 and BF16 modes for tensor parallelism and pipeline parallelism.
256
  6. **AMD GPU**: Enables running the DeepSeek-V3 model on AMD GPUs via SGLang in both BF16 and FP8 modes.
257
  7. **Huawei Ascend NPU**: Supports running DeepSeek-V3 on Huawei Ascend devices.
258
 
 
265
  python fp8_cast_bf16.py --input-fp8-hf-path /path/to/fp8_weights --output-bf16-hf-path /path/to/bf16_weights
266
  ```
267
 
268
+ > [!NOTE]
269
+ > Hugging Face's Transformers has not been directly supported yet.
270
 
271
  ### 6.1 Inference with DeepSeek-Infer Demo (example only)
272
 
273
+ #### System Requirements
274
+
275
+ > [!NOTE]
276
+ > Linux with Python 3.10 only. Mac and Windows are not supported.
277
+
278
+ Dependencies:
279
+ ```pip-requirements
280
+ torch==2.4.1
281
+ triton==3.0.0
282
+ transformers==4.46.3
283
+ safetensors==0.4.5
284
+ ```
285
  #### Model Weights & Demo Code Preparation
286
 
287
  First, clone our DeepSeek-V3 GitHub repository:
 
290
  git clone https://github.com/deepseek-ai/DeepSeek-V3.git
291
  ```
292
 
293
+ Navigate to the `inference` folder and install dependencies listed in `requirements.txt`. Easiest way is to use a package manager like `conda` or `uv` to create a new virtual environment and install the dependencies.
294
 
295
  ```shell
296
  cd DeepSeek-V3/inference
297
  pip install -r requirements.txt
298
  ```
299
 
300
+ Download the model weights from Hugging Face, and put them into `/path/to/DeepSeek-V3` folder.
301
 
302
  #### Model Weights Conversion
303
 
304
+ Convert Hugging Face model weights to a specific format:
305
 
306
  ```shell
307
  python convert.py --hf-ckpt-path /path/to/DeepSeek-V3 --save-path /path/to/DeepSeek-V3-Demo --n-experts 256 --model-parallel 16
 
312
  Then you can chat with DeepSeek-V3:
313
 
314
  ```shell
315
+ torchrun --nnodes 2 --nproc-per-node 8 --node-rank $RANK --master-addr $ADDR generate.py --ckpt-path /path/to/DeepSeek-V3-Demo --config configs/config_671B.json --interactive --temperature 0.7 --max-new-tokens 200
316
  ```
317
 
318
  Or batch inference on a given file:
319
 
320
  ```shell
321
+ torchrun --nnodes 2 --nproc-per-node 8 --node-rank $RANK --master-addr $ADDR generate.py --ckpt-path /path/to/DeepSeek-V3-Demo --config configs/config_671B.json --input-file $FILE
322
  ```
323
 
324
  ### 6.2 Inference with SGLang (recommended)
 
327
 
328
  Notably, [SGLang v0.4.1](https://github.com/sgl-project/sglang/releases/tag/v0.4.1) fully supports running DeepSeek-V3 on both **NVIDIA and AMD GPUs**, making it a highly versatile and robust solution.
329
 
330
+ SGLang also supports [multi-node tensor parallelism](https://github.com/sgl-project/sglang/tree/main/benchmark/deepseek_v3#example-serving-with-2-h208), enabling you to run this model on multiple network-connected machines.
331
+
332
+ Multi-Token Prediction (MTP) is in development, and progress can be tracked in the [optimization plan](https://github.com/sgl-project/sglang/issues/2591).
333
+
334
  Here are the launch instructions from the SGLang team: https://github.com/sgl-project/sglang/tree/main/benchmark/deepseek_v3
335
 
336
  ### 6.3 Inference with LMDeploy (recommended)
 
343
 
344
  [TensorRT-LLM](https://github.com/NVIDIA/TensorRT-LLM) now supports the DeepSeek-V3 model, offering precision options such as BF16 and INT4/INT8 weight-only. Support for FP8 is currently in progress and will be released soon. You can access the custom branch of TRTLLM specifically for DeepSeek-V3 support through the following link to experience the new features directly: https://github.com/NVIDIA/TensorRT-LLM/tree/deepseek/examples/deepseek_v3.
345
 
346
+
347
  ### 6.5 Inference with vLLM (recommended)
348
 
349
  [vLLM](https://github.com/vllm-project/vllm) v0.6.6 supports DeepSeek-V3 inference for FP8 and BF16 modes on both NVIDIA and AMD GPUs. Aside from standard techniques, vLLM offers _pipeline parallelism_ allowing you to run this model on multiple machines connected by networks. For detailed guidance, please refer to the [vLLM instructions](https://docs.vllm.ai/en/latest/serving/distributed_serving.html). Please feel free to follow [the enhancement plan](https://github.com/vllm-project/vllm/issues/11539) as well.
 
363
  ```
364
  @misc{deepseekai2024deepseekv3technicalreport,
365
  title={DeepSeek-V3 Technical Report},
366
+ author={DeepSeek-AI and Aixin Liu and Bei Feng and Bing Xue and Bingxuan Wang and Bochao Wu and Chengda Lu and Chenggang Zhao and Chengqi Deng and Chenyu Zhang and Chong Ruan and Damai Dai and Daya Guo and Dejian Yang and Deli Chen and Dongjie Ji and Erhang Li and Fangyun Lin and Fucong Dai and Fuli Luo and Guangbo Hao and Guanting Chen and Guowei Li and H. Zhang and Han Bao and Hanwei Xu and Haocheng Wang and Haowei Zhang and Honghui Ding and Huajian Xin and Huazuo Gao and Hui Li and Hui Qu and J. L. Cai and Jian Liang and Jianzhong Guo and Jiaqi Ni and Jiashi Li and Jiawei Wang and Jin Chen and Jingchang Chen and Jingyang Yuan and Junjie Qiu and Junlong Li and Junxiao Song and Kai Dong and Kai Hu and Kaige Gao and Kang Guan and Kexin Huang and Kuai Yu and Lean Wang and Lecong Zhang and Lei Xu and Leyi Xia and Liang Zhao and Litong Wang and Liyue Zhang and Meng Li and Miaojun Wang and Mingchuan Zhang and Minghua Zhang and Minghui Tang and Mingming Li and Ning Tian and Panpan Huang and Peiyi Wang and Peng Zhang and Qiancheng Wang and Qihao Zhu and Qinyu Chen and Qiushi Du and R. J. Chen and R. L. Jin and Ruiqi Ge and Ruisong Zhang and Ruizhe Pan and Runji Wang and Runxin Xu and Ruoyu Zhang and Ruyi Chen and S. S. Li and Shanghao Lu and Shangyan Zhou and Shanhuang Chen
 
 
 
 
 
 
367
  ```
368
 
369
  ## 9. Contact
370
+ If you have any questions, please raise an issue or contact us at [[email protected]]([email protected]).