GEOZ

DeepSeek-R1 用纯强化学习训练推理模型,性能直追 OpenAI o1

2026/7/27
DeepSeek-R1 用纯强化学习训练推理模型,性能直追 OpenAI o1

AIAI Summary (BLUF)

DeepSeek发布新一代推理模型DeepSeek-R1系列,包括通过纯强化学习训练的DeepSeek-R1-Zero和优化后的DeepSeek-R1,在数学、编程和推理任务上性能媲美OpenAI o1。此外,还开源了基于Qwen和Llama的蒸馏版本(1.5B至70B),其中32B模型超越o1-mini。文章详细介绍了模型架构、训练方法和基准测试结果。

核心洞察

读完 DeepSeek-R1 的技术报告,最有意思的地方不是它比 o1 强了多少,而是它证明了一件事:纯强化学习就能让模型学会推理,压根不需要提前做监督微调。这一点值得所有做 LLM 训练的人放慢脚步想一想。不过蒸馏出来的小模型表现更好,这个结果倒是意料之中。


核心结论

  1. DeepSeek-R1-Zero 完全通过大规模强化学习训练,没有使用任何监督微调数据,就使模型自主涌现出自我验证、反思和长链推理能力,这是开源研究中首次验证纯 RL 即可激发 LLM 的推理能力。

  2. DeepSeek-R1 在数学推理基准测试中超越了 OpenAI o1-1217:AIME 2024 达到 79.8% pass@1(o1-1217 为 79.2%),MATH-500 达到 97.3% pass@1(o1-1217 为 96.4%),并在编程任务 Codeforces 上获得 2029 rating(o1-1217 为 2061)。

  3. 蒸馏模型 DeepSeek-R1-Distill-Qwen-32B 在多个基准测试上超过 OpenAI o1-mini:AIME 2024 达到 72.6% pass@1(o1-mini 63.6%),MATH-500 达到 94.3% pass@1(o1-mini 90.0%),成为稠密模型新 SOTA。

  4. 将大模型的推理模式蒸馏到小模型效果显著:DeepSeek-R1-Distill-Qwen-1.5B(仅 15 亿参数)在 AIME 2024 上取得 28.9% pass@1,远超 GPT-4o(9.3%)和 Claude-3.5-Sonnet(16.0%)。

1. 引言

我们发布了第一代推理模型:DeepSeek-R1-Zero 和 DeepSeek-R1。DeepSeek-R1-Zero 完全靠大规模强化学习训练,没用监督微调做预热,结果推理效果出奇地好。强化学习让模型自己涌现出很多强大又有意思的推理行为。

但 DeepSeek-R1-Zero 也有毛病:无限重复、输出可读性差、中英文混着来。为了修这些问题,同时进一步提升推理能力,我们在强化学习之前加了冷启动数据,做出了 DeepSeek-R1。

在数学、编程和推理任务上,DeepSeek-R1 的表现跟 OpenAI-o1 差不多。我们已经把 DeepSeek-R1-Zero、DeepSeek-R1,还有基于 Llama 和 Qwen 蒸馏出来的六个稠密模型全部开源了。DeepSeek-R1-Distill-Qwen-32B 在多个基准测试上超过了 OpenAI-o1-mini,在稠密模型里达到了新 SOTA。

注意:在本地跑 DeepSeek-R1 系列模型之前,建议先看看后面的使用建议。


2. 模型总结

后训练:在基座模型上做大规模强化学习

我们对基座模型直接上强化学习,跳过监督微调这一步。这样模型就能自己探索思维链来解决复杂问题,于是有了 DeepSeek-R1-Zero。R1-Zero 展现出了自我验证、反思和生成长链思维的能力,这对研究者来说算是个里程碑。这是第一次有开源研究验证:不需要监督微调,单靠强化学习就能激发 LLM 的推理能力。

我们又开发了训练 DeepSeek-R1 的完整流程。这个流程包括两轮强化学习,用来挖掘更好的推理模式并对齐人类偏好,还有两轮监督微调,作为模型推理能力和非推理能力的种子。我们觉得这套流程能给行业带来帮助。

蒸馏:小模型也能很强

我们发现,大模型的推理模式可以蒸馏到小模型里,效果比在小模型上直接跑强化学习找出来的推理模式好。开源 DeepSeek-R1 及其 API,能帮研究者将来蒸馏出更好的小模型。

我们用 DeepSeek-R1 生成的推理数据,微调了几个社区常用的稠密模型。评估结果很亮眼:蒸馏出来的小稠密模型在基准测试上表现极佳。我们开源了基于 Qwen2.5 和 Llama3 系列的 1.5B、7B、8B、14B、32B、70B 版本。


3. 模型下载

DeepSeek-R1 模型

模型 总参数 激活参数 上下文长度 下载
DeepSeek-R1-Zero 671B 37B 128K HuggingFace
DeepSeek-R1 671B 37B 128K HuggingFace

DeepSeek-R1-Zero 和 DeepSeek-R1 都基于 DeepSeek-V3-Base 训练。模型架构细节可以看 DeepSeek-V3 仓库。

DeepSeek-R1-Distill 模型

模型 基座模型 下载
DeepSeek-R1-Distill-Qwen-1.5B Qwen2.5-Math-1.5B HuggingFace
DeepSeek-R1-Distill-Qwen-7B Qwen2.5-Math-7B HuggingFace
DeepSeek-R1-Distill-Llama-8B Llama-3.1-8B HuggingFace
DeepSeek-R1-Distill-Qwen-14B Qwen2.5-14B HuggingFace
DeepSeek-R1-Distill-Qwen-32B Qwen2.5-32B HuggingFace
DeepSeek-R1-Distill-Llama-70B Llama-3.3-70B-Instruct HuggingFace

DeepSeek-R1-Distill 模型是在开源模型上用 DeepSeek-R1 的样本微调的。我们稍微改了它们的配置和分词器,跑的时候要用我们的设置。


4. 评测结果

DeepSeek-R1 评测

所有模型的最大生成长度设为 32768 token。需要采样的基准测试用 temperature 0.6、top-p 0.95,每次查询生成 64 个回答来计算 pass@1。

类别 基准测试(指标) Claude-3.5-Sonnet-1022 GPT-4o 0513 DeepSeek V3 OpenAI o1-mini OpenAI o1-1217 DeepSeek R1
架构 - - MoE - - MoE
激活参数 - - 37B - - 37B
总参数 - - 671B - - 671B
英文 MMLU (Pass@1) 88.3 87.2 88.5 85.2 91.8 90.8
MMLU-Redux (EM) 88.9 88.0 89.1 86.7 - 92.9
MMLU-Pro (EM) 78.0 72.6 75.9 80.3 - 84.0
DROP (3-shot F1) 88.3 83.7 91.6 83.9 90.2 92.2
IF-Eval (Prompt Strict) 86.5 84.3 86.1 84.8 - 83.3
GPQA-Diamond (Pass@1) 65.0 49.9 59.1 60.0 75.7 71.5
SimpleQA (Correct) 28.4 38.2 24.9 7.0 47.0 30.1
FRAMES (Acc.) 72.5 80.5 73.3 76.9 - 82.5
AlpacaEval2.0 (LC-winrate) 52.0 51.1 70.0 57.8 - 87.6
ArenaHard (GPT-4-1106) 85.2 80.4 85.5 92.0 - 92.3
代码 LiveCodeBench (Pass@1-COT) 33.8 34.2 - 53.8 63.4 65.9
Codeforces (Percentile) 20.3 23.6 58.7 93.4 96.6 96.3
Codeforces (Rating) 717 759 1134 1820 2061 2029
SWE Verified (Resolved) 50.8 38.8 42.0 41.6 48.9 49.2
Aider-Polyglot (Acc.) 45.3 16.0 49.6 32.9 61.7 53.3
数学 AIME 2024 (Pass@1) 16.0 9.3 39.2 63.6 79.2 79.8
MATH-500 (Pass@1) 78.3 74.6 90.2 90.0 96.4 97.3
CNMO 2024 (Pass@1) 13.1 10.8 43.2 67.6 - 78.8
中文 CLUEWSC (EM) 85.4 87.9 90.9 89.9 - 92.8
C-Eval (EM) 76.7 76.0 86.5 68.9 - 91.8
C-SimpleQA (Correct) 55.4 58.7 68.0 40.3 - 63.7

蒸馏模型评测

模型 AIME 2024 pass@1 AIME 2024 cons@64 MATH-500 pass@1 GPQA Diamond pass@1 LiveCodeBench pass@1 CodeForces rating
GPT-4o-0513 9.3 13.4 74.6 49.9 32.9 759
Claude-3.5-Sonnet-1022 16.0 26.7 78.3 65.0 38.9 717
o1-mini 63.6 80.0 90.0 60.0 53.8 1820
QwQ-32B-Preview 44.0 60.0 90.6 54.5 41.9 1316
DeepSeek-R1-Distill-Qwen-1.5B 28.9 52.7 83.9 33.8 16.9 954
DeepSeek-R1-Distill-Qwen-7B 55.5 83.3 92.8 49.1 37.6 1189
DeepSeek-R1-Distill-Qwen-14B 69.7 80.0 93.9 59.1 53.1 1481
DeepSeek-R1-Distill-Qwen-32B 72.6 83.3 94.3 62.1 57.2 1691
DeepSeek-R1-Distill-Llama-8B 50.4 80.0 89.1 49.0 39.6 1205
DeepSeek-R1-Distill-Llama-70B 70.0 86.7 94.5 65.2 57.5 1633

5. 聊天网站与 API 平台

可以在 DeepSeek 官网 chat.deepseek.com 上直接聊,打开 "DeepThink" 按钮就行。

也提供了 OpenAI 兼容的 API,地址是 platform.deepseek.com。


6. 本地运行方法

DeepSeek-R1 模型

本地运行 DeepSeek-R1 的具体方法请参考 DeepSeek-V3 仓库。

注意:Transformers 还没直接支持。

DeepSeek-R1-Distill 模型

DeepSeek-R1-Distill 模型用法跟 Qwen 或 Llama 一样。

举个例子,用 vLLM 启一个服务:

vllm serve deepseek-ai/DeepSeek-R1-Distill-Qwen-32B --tensor-parallel-size 2 --max-model-len 32768 --enforce-eager

也可以用 SGLang:

python3 -m sglang.launch_server --model deepseek-ai/DeepSeek-R1-Distill-Qwen-32B --trust-remote-code --tp 2

使用建议

用 DeepSeek-R1 系列模型时,建议按下面的配置来跑,包括做基准测试的时候,这样才能达到预期效果:

  1. temperature 设在 0.5 到 0.7 之间,推荐 0.6,避免无限重复或输出混乱。
  2. 不要加 system prompt,所有指令都写在 user prompt 里。
  3. 数学问题的话,建议在 prompt 里加上:"请一步一步推理,并把最终答案放在 \boxed{} 里。"
  4. 评估模型性能时,多测几次取平均值。

另外,我们观察到 DeepSeek-R1 系列模型有时候会跳过思考过程,直接输出空的 <think>``</think>,这会影响性能。建议强制让模型每次输出都以 "<think>\n" 开头,确保它充分推理。

官方 Prompt

在 DeepSeek 网页和 App 里,我们没有用 system prompt,而是专门设计了文件上传和网页搜索的 prompt。网页和 App 的 temperature 是 0.6。

文件上传的 prompt 模板如下,{file_name}、{file_content} 和 {question} 是变量:

[file name]: {file_name}
[file content begin]
{file_content}
[file content end]
{question}

网页搜索 prompt,{search_results}、{cur_date} 和 {question} 是变量。

中文查询用的 prompt:

# 以下内容是基于用户发送的消息的搜索结果:
{search_results}
在我给你的搜索结果中,每个结果都是[webpage X begin]...[webpage X end]格式的,X代表每篇文章的数字索引。请在适当的情况下在句子末尾引用上下文。请按照引用编号[citation:X]的格式在答案中对应部分引用上下文。如果一句话源自多个上下文,请列出所有相关的引用编号,例如[citation:3][citation:5],切记不要将引用集中在最后返回引用编号,而是在答案对应部分列出。
在回答时,请注意以下几点:
- 今天是{cur_date}。
- 并非搜索结果的所有内容都与用户的问题密切相关,你需要结合问题,对搜索结果进行甄别、筛选。
- 对于列举类的问题(如列举所有航班信息),尽量将答案控制在10个要点以内,并告诉用户可以查看搜索来源、获得完整信息。优先提供信息完整、最相关的列举项;如非必要,不要主动告诉用户搜索结果未提供的内容。
- 对于创作类的问题(如写论文),请务必在正文的段落中引用对应的参考编号,例如[citation:3][citation:5],不能只在文章末尾引用。你需要解读并概括用户的题目要求,选择合适的格式,充分利用搜索结果并抽取重要信息,生成符合用户要求、极具思想深度、富有创造力与专业性的答案。你的创作篇幅需要尽可能延长,对于每一个要点的论述要推测用户的意图,给出尽可能多角度的回答要点,且务必信息量大、论述详尽。
- 如果回答很长,请尽量结构化、分段落总结。如果需要分点作答,尽量控制在5个点以内,并合并相关的内容。
- 对于客观类的问答,如果问题的答案非常简短,可以适当补充一到两句相关信息,以丰富内容。
- 你需要根据用户要求和回答内容选择合适、美观的回答格式,确保可读性强。
- 你的回答应该综合多个相关网页来回答,不能重复引用一个网页。
- 除非用户要求,否则你回答的语言需要和用户提问的语言保持一致。

# 用户消息为:
{question}

英文查询用的 prompt:

# The following contents are the search results related to the user's message:
{search_results}
In 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.
When responding, please keep the following points in mind:
- Today is {cur_date}.
- 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.
- 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.
- 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.
- 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.
- For objective Q&amp;A, if the answer is very brief, you may add one or two related sentences to enrich the content.
- 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.
- Your answer should synthesize information from multiple relevant webpages and avoid repeatedly citing the same webpage.
- Unless the user requests otherwise, your response should be in the same language as the user's question.

# The user's message is:
{question}

7. 许可证

代码仓库和模型权重使用 MIT 许可证。DeepSeek-R1 系列支持商业使用,允许任何修改和衍生作品,包括蒸馏来训练其他 LLM。

DeepSeek-R1-Distill-Qwen-1.5B、7B、14B 和 32B 来自 Qwen-2.5 系列,原始许可证是 Apache 2.0,然后用 DeepSeek-R1 精选的 80 万条样本微调过。DeepSeek-R1-Distill-Llama-8B 来自 Llama3.1-8B-Base,原始是 Llama3.1 许可证。DeepSeek-R1-Distill-Llama-70B 来自 Llama3.3-70B-Instruct,原始是 Llama3.3 许可证。


8. 引用

@misc{deepseekai2025deepseekr1incentivizingreasoningcapability,
      title={DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning}, 
      author={DeepSeek-AI},
      year={2025},
      eprint={2501.12948},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2501.12948}, 
}

9. 联系

有问题可以提 issue,或者发邮件到 service@deepseek.com

常见问题(FAQ)

DeepSeek-R1和OpenAI o1哪个更强?

在数学、编程等推理任务上,DeepSeek-R1性能媲美OpenAI o1,部分基准测试如AIME 2024和MATH-500甚至略超o1-1217,但o1在部分工具测试中仍领先。

DeepSeek-R1模型怎么下载?

DeepSeek-R1-Zero和DeepSeek-R1(671B)可通过HuggingFace下载,蒸馏版(1.5B至70B)基于Qwen和Llama也开源,均提供HuggingFace链接。

蒸馏小模型为什么比直接训练效果好?

大模型(DeepSeek-R1)的推理模式通过蒸馏迁移到小模型,比在小模型上直接强化学习更高效,如32B模型超越o1-mini,成为稠密模型新SOTA。

晓婷深圳
本文由 晓婷 审核,最后更新于 2026年7月27日
联系编辑 →
← 返回文章列表
分享到:微博

版权与免责声明:本文仅用于信息分享与交流,不构成任何形式的法律、投资、医疗或其他专业建议,也不构成对任何结果的承诺或保证。

文中提及的商标、品牌、Logo、产品名称及相关图片/素材,其权利归各自合法权利人所有。本站内容可能基于公开资料整理,亦可能使用 AI 辅助生成或润色;我们尽力确保准确与合规,但不保证完整性、时效性与适用性,请读者自行甄别并以官方信息为准。

若本文内容或素材涉嫌侵权、隐私不当或存在错误,请相关权利人/当事人联系本站,我们将及时核实并采取删除、修正或下架等处理措施。也请勿在评论或联系信息中提交身份证号、手机号、住址等个人敏感信息。