deepseek-ai/DeepSeek-V3-0324
3.2k1.1m
1---2license: mit3library_name: transformers4---5# DeepSeek-V3-03246<!-- markdownlint-disable first-line-h1 -->7<!-- markdownlint-disable html -->8<!-- markdownlint-disable no-duplicate-header -->9 10<div align="center">11 <img src="https://github.com/deepseek-ai/DeepSeek-V2/blob/main/figures/logo.svg?raw=true" width="60%" alt="DeepSeek-V3" />12</div>13<hr>14<div align="center" style="line-height: 1;">15 <a href="https://www.deepseek.com/" target="_blank" style="margin: 2px;">16 <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;"/>17 </a>18 <a href="https://chat.deepseek.com/" target="_blank" style="margin: 2px;">19 <img alt="Chat" src="https://img.shields.io/badge/🤖%20Chat-DeepSeek%20V3-536af5?color=536af5&logoColor=white" style="display: inline-block; vertical-align: middle;"/>20 </a>21 <a href="https://huggingface.co/deepseek-ai" target="_blank" style="margin: 2px;">22 <img alt="Hugging Face" src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-DeepSeek%20AI-ffc107?color=ffc107&logoColor=white" style="display: inline-block; vertical-align: middle;"/>23 </a>24</div>25 26<div align="center" style="line-height: 1;">27 <a href="https://discord.gg/Tc7c45Zzu5" target="_blank" style="margin: 2px;">28 <img alt="Discord" src="https://img.shields.io/badge/Discord-DeepSeek%20AI-7289da?logo=discord&logoColor=white&color=7289da" style="display: inline-block; vertical-align: middle;"/>29 </a>30 <a href="https://github.com/deepseek-ai/DeepSeek-V2/blob/main/figures/qr.jpeg?raw=true" target="_blank" style="margin: 2px;">31 <img alt="Wechat" src="https://img.shields.io/badge/WeChat-DeepSeek%20AI-brightgreen?logo=wechat&logoColor=white" style="display: inline-block; vertical-align: middle;"/>32 </a>33 <a href="https://twitter.com/deepseek_ai" target="_blank" style="margin: 2px;">34 <img alt="Twitter Follow" src="https://img.shields.io/badge/Twitter-deepseek_ai-white?logo=x&logoColor=white" style="display: inline-block; vertical-align: middle;"/>35 </a>36</div>37 38<div align="center" style="line-height: 1;">39 <a href="LICENSE" style="margin: 2px;">40 <img alt="License" src="https://img.shields.io/badge/License-MIT-f5de53?&color=f5de53" style="display: inline-block; vertical-align: middle;"/>41 </a>42</div>43 44## Features45 46DeepSeek-V3-0324 demonstrates notable improvements over its predecessor, DeepSeek-V3, in several key aspects.47 4849 50### Reasoning Capabilities51 52- Significant improvements in benchmark performance:53 - MMLU-Pro: 75.9 → 81.2 (+5.3)54 - GPQA: 59.1 → 68.4 (+9.3)55 - AIME: 39.6 → 59.4 (+19.8)56 - LiveCodeBench: 39.2 → 49.2 (+10.0)57 58### Front-End Web Development59 60- Improved the executability of the code61- More aesthetically pleasing web pages and game front-ends62 63### Chinese Writing Proficiency64 65- Enhanced style and content quality:66 - Aligned with the R1 writing style67 - Better quality in medium-to-long-form writing68 69- Feature Enhancements70 - Improved multi-turn interactive rewriting71 - Optimized translation quality and letter writing72 73### Chinese Search Capabilities74 75- Enhanced report analysis requests with more detailed outputs76 77### Function Calling Improvements78 79- Increased accuracy in Function Calling, fixing issues from previous V3 versions80 81---82 83## Usage Recommendations84 85### System Prompt86 87In the official DeepSeek web/app, we use the same system prompt with a specific date.88 89```90该助手为DeepSeek Chat,由深度求索公司创造。91今天是{current date}。92```93 94For example,95 96```97该助手为DeepSeek Chat,由深度求索公司创造。98今天是3月24日,星期一。99```100 101### Temperature102 103In our web and application environments, the temperature parameter $T_{model}$ is set to 0.3. Because many users use the default temperature 1.0 in API call, we have implemented an API temperature $T_{api}$ mapping mechanism that adjusts the input API temperature value of 1.0 to the most suitable model temperature setting of 0.3.104 105$$106T_{model} = T_{api} \times 0.3 \quad (0 \leq T_{api} \leq 1)107$$108 109$$110T_{model} = T_{api} - 0.7 \quad (1 < T_{api} \leq 2)111$$112 113Thus, if you call V3 via API, temperature 1.0 equals to the model temperature 0.3.114 115### Prompts for File Uploading and Web Search116 117For file uploading, please follow the template to create prompts, where {file_name}, {file_content} and {question} are arguments.118 119```120file_template = \121"""[file name]: {file_name}122[file content begin]123{file_content}124[file content end]125{question}"""126```127 128For Web Search, {search_results}, {cur_date}, and {question} are arguments.129 130For Chinese query, we use the prompt:131 132```133search_answer_zh_template = \134'''# 以下内容是基于用户发送的消息的搜索结果:135{search_results}136在我给你的搜索结果中,每个结果都是[webpage X begin]...[webpage X end]格式的,X代表每篇文章的数字索引。请在适当的情况下在句子末尾引用上下文。请按照引用编号[citation:X]的格式在答案中对应部分引用上下文。如果一句话源自多个上下文,请列出所有相关的引用编号,例如[citation:3][citation:5],切记不要将引用集中在最后返回引用编号,而是在答案对应部分列出。137在回答时,请注意以下几点:138- 今天是{cur_date}。139- 并非搜索结果的所有内容都与用户的问题密切相关,你需要结合问题,对搜索结果进行甄别、筛选。140- 对于列举类的问题(如列举所有航班信息),尽量将答案控制在10个要点以内,并告诉用户可以查看搜索来源、获得完整信息。优先提供信息完整、最相关的列举项;如非必要,不要主动告诉用户搜索结果未提供的内容。141- 对于创作类的问题(如写论文),请务必在正文的段落中引用对应的参考编号,例如[citation:3][citation:5],不能只在文章末尾引用。你需要解读并概括用户的题目要求,选择合适的格式,充分利用搜索结果并抽取重要信息,生成符合用户要求、极具思想深度、富有创造力与专业性的答案。你的创作篇幅需要尽可能延长,对于每一个要点的论述要推测用户的意图,给出尽可能多角度的回答要点,且务必信息量大、论述详尽。142- 如果回答很长,请尽量结构化、分段落总结。如果需要分点作答,尽量控制在5个点以内,并合并相关的内容。143- 对于客观类的问答,如果问题的答案非常简短,可以适当补充一到两句相关信息,以丰富内容。144- 你需要根据用户要求和回答内容选择合适、美观的回答格式,确保可读性强。145- 你的回答应该综合多个相关网页来回答,不能重复引用一个网页。146- 除非用户要求,否则你回答的语言需要和用户提问的语言保持一致。147 148# 用户消息为:149{question}'''150```151 152For English query, we use the prompt:153 154```155search_answer_en_template = \156'''# The following contents are the search results related to the user's message:157{search_results}158In the search results I provide to you, each result is formatted as [webpage X begin]...[webpage X end], where X represents the numerical index of each article. Please cite the context at the end of the relevant sentence when appropriate. Use the citation format [citation:X] in the corresponding part of your answer. If a sentence is derived from multiple contexts, list all relevant citation numbers, such as [citation:3][citation:5]. Be sure not to cluster all citations at the end; instead, include them in the corresponding parts of the answer.159When responding, please keep the following points in mind:160- Today is {cur_date}.161- Not all content in the search results is closely related to the user's question. You need to evaluate and filter the search results based on the question.162- For listing-type questions (e.g., listing all flight information), try to limit the answer to 10 key points and inform the user that they can refer to the search sources for complete information. Prioritize providing the most complete and relevant items in the list. Avoid mentioning content not provided in the search results unless necessary.163- For creative tasks (e.g., writing an essay), ensure that references are cited within the body of the text, such as [citation:3][citation:5], rather than only at the end of the text. You need to interpret and summarize the user's requirements, choose an appropriate format, fully utilize the search results, extract key information, and generate an answer that is insightful, creative, and professional. Extend the length of your response as much as possible, addressing each point in detail and from multiple perspectives, ensuring the content is rich and thorough.164- If the response is lengthy, structure it well and summarize it in paragraphs. If a point-by-point format is needed, try to limit it to 5 points and merge related content.165- For objective Q&A, if the answer is very brief, you may add one or two related sentences to enrich the content.166- Choose an appropriate and visually appealing format for your response based on the user's requirements and the content of the answer, ensuring strong readability.167- Your answer should synthesize information from multiple relevant webpages and avoid repeatedly citing the same webpage.168- Unless the user requests otherwise, your response should be in the same language as the user's question.169 170# The user's message is:171{question}'''172```173 174## How to Run Locally175 176The model structure of DeepSeek-V3-0324 is exactly the same as DeepSeek-V3. Please visit [DeepSeek-V3](https://github.com/deepseek-ai/DeepSeek-V3) repo for more information about running this model locally.177 178**This model supports features such as function calling, JSON output, and FIM completion. For instructions on how to construct prompts to use these features, please refer to [DeepSeek-V2.5](https://huggingface.co/deepseek-ai/DeepSeek-V2.5#function-calling) repo.**179 180**NOTE: Hugging Face's Transformers has not been directly supported yet.**181 182## License183 184This repository and the model weights are licensed under the [MIT License](LICENSE).185 186## Citation187 188```189@misc{deepseekai2024deepseekv3technicalreport,190 title={DeepSeek-V3 Technical Report}, 191 author={DeepSeek-AI},192 year={2024},193 eprint={2412.19437},194 archivePrefix={arXiv},195 primaryClass={cs.CL},196 url={https://arxiv.org/abs/2412.19437}, 197}198```199 200## Contact201If you have any questions, please raise an issue or contact us at [service@deepseek.com](service@deepseek.com).202 