OA0 = Omni AI 0
OA0 是一个探索 AI 的论坛
现在注册
已注册用户请  登录
OA0  ›  代码  ›  DeepSeek-R1 — 强化的开源推理模型

DeepSeek-R1 — 强化的开源推理模型

 
  llm ·  2026-02-28 10:00:00 · 89 次点击  · 0 条评论  

DeepSeek-R1

DeepSeek-R1

1. 简介

我们推出了第一代推理模型:DeepSeek-R1-Zero 和 DeepSeek-R1。
DeepSeek-R1-Zero 是一个通过大规模强化学习(RL)训练、无需监督微调(SFT)作为前置步骤的模型,在推理任务上展现了卓越的性能。
通过强化学习,DeepSeek-R1-Zero 自然地涌现出众多强大且有趣的推理行为。
然而,DeepSeek-R1-Zero 也面临无限重复、可读性差和语言混杂等挑战。为了解决这些问题并进一步提升推理性能,
我们推出了 DeepSeek-R1,它在强化学习前引入了冷启动数据。
DeepSeek-R1 在数学、代码和推理任务上的性能与 OpenAI-o1 相当。
为了支持研究社区,我们开源了 DeepSeek-R1-Zero、DeepSeek-R1,以及基于 Llama 和 Qwen 从 DeepSeek-R1 蒸馏出的六个稠密模型。DeepSeek-R1-Distill-Qwen-32B 在各种基准测试中超越了 OpenAI-o1-mini,为稠密模型创造了新的最先进结果。

注意:在本地运行 DeepSeek-R1 系列模型之前,我们建议您先阅读 使用建议 部分。

2. 模型概述


后训练:在基础模型上进行大规模强化学习

  • 我们直接在基础模型上应用强化学习(RL),无需依赖监督微调(SFT)作为前置步骤。这种方法使模型能够探索思维链(CoT)来解决复杂问题,从而开发出 DeepSeek-R1-Zero。DeepSeek-R1-Zero 展示了自我验证、反思和生成长思维链等能力,为研究社区树立了重要里程碑。值得注意的是,这是首个验证大语言模型推理能力可以纯粹通过强化学习激励、无需 SFT 的开源研究。这一突破为该领域的未来发展铺平了道路。

  • 我们介绍了开发 DeepSeek-R1 的流程。该流程包含两个 RL 阶段,旨在发现更好的推理模式并与人类偏好对齐,以及两个 SFT 阶段,作为模型推理和非推理能力的种子。
    我们相信该流程将通过创建更好的模型使行业受益。


蒸馏:小模型也能很强大

  • 我们证明了可以将大模型的推理模式蒸馏到小模型中,与在小模型上通过 RL 发现的推理模式相比,能获得更好的性能。开源的 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](https://huggingface.co/deepseek-ai/DeepSeek-R1-Zero) | | DeepSeek-R1 | 671B | 37B | 128K | [🤗 HuggingFace](https://huggingface.co/deepseek-ai/DeepSeek-R1) |

DeepSeek-R1-Zero 和 DeepSeek-R1 基于 DeepSeek-V3-Base 训练。
有关模型架构的更多详细信息,请参阅 DeepSeek-V3 仓库。

DeepSeek-R1-Distill 模型

| **模型** | **基础模型** | **下载** | | :------------: | :------------: | :------------: | | DeepSeek-R1-Distill-Qwen-1.5B | [Qwen2.5-Math-1.5B](https://huggingface.co/Qwen/Qwen2.5-Math-1.5B) | [🤗 HuggingFace](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B) | | DeepSeek-R1-Distill-Qwen-7B | [Qwen2.5-Math-7B](https://huggingface.co/Qwen/Qwen2.5-Math-7B) | [🤗 HuggingFace](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-7B) | | DeepSeek-R1-Distill-Llama-8B | [Llama-3.1-8B](https://huggingface.co/meta-llama/Llama-3.1-8B) | [🤗 HuggingFace](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Llama-8B) | | DeepSeek-R1-Distill-Qwen-14B | [Qwen2.5-14B](https://huggingface.co/Qwen/Qwen2.5-14B) | [🤗 HuggingFace](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-14B) | |DeepSeek-R1-Distill-Qwen-32B | [Qwen2.5-32B](https://huggingface.co/Qwen/Qwen2.5-32B) | [🤗 HuggingFace](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-32B) | | DeepSeek-R1-Distill-Llama-70B | [Llama-3.3-70B-Instruct](https://huggingface.co/meta-llama/Llama-3.3-70B-Instruct) | [🤗 HuggingFace](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Llama-70B) |

DeepSeek-R1-Distill 模型基于开源模型,使用 DeepSeek-R1 生成的样本进行微调。
我们略微修改了它们的配置和分词器。请使用我们的设置来运行这些模型。

4. 评估结果

DeepSeek-R1 评估

对于我们所有的模型,最大生成长度设置为 32,768 个令牌。对于需要采样的基准测试,我们使用温度 $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 官方网站上与 DeepSeek-R1 聊天:chat.deepseek.com,并开启 "DeepThink" 按钮。

我们还在 DeepSeek 平台提供 OpenAI 兼容的 API:platform.deepseek.com

6. 如何在本地运行

DeepSeek-R1 模型

请访问 DeepSeek-V3 仓库以获取有关在本地运行 DeepSeek-R1 的更多信息。

注意:Hugging Face 的 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 轻松启动服务:

```bash
python3 -m sglang.launch_server --model deepseek-ai/DeepSeek-R1-Distill-Qwen-

89 次点击  ∙  0 人收藏  
登录后收藏  
目前尚无回复
0 条回复
About   ·   Help   ·    
OA0 - Omni AI 0 一个探索 AI 的社区
沪ICP备2024103595号-2
Developed with Cursor