模型简介
模型特点
模型能力
使用案例
🚀 DeepSeek-R1
DeepSeek-R1 是第一代推理模型,包含 DeepSeek-R1-Zero 和 DeepSeek-R1。该模型在数学、代码和推理任务中表现出色,部分性能可与 OpenAI-o1 相媲美。此外,项目还开源了相关模型及基于 Llama 和 Qwen 蒸馏的六个密集模型。
🚀 快速开始
在本地运行 DeepSeek-R1 系列模型前,请先查看 使用建议 部分。
你可以在 DeepSeek 的官方网站 chat.deepseek.com 上与 DeepSeek-R1 进行对话,并开启 “DeepThink” 按钮。
我们还在 DeepSeek 平台 platform.deepseek.com 上提供了与 OpenAI 兼容的 API。
✨ 主要特性
模型研发
- 大规模强化学习后训练:直接对基础模型应用强化学习(RL),不依赖有监督微调(SFT)作为初步步骤,开发出 DeepSeek-R1-Zero。该模型展现出自我验证、反思和生成长思维链(CoT)等能力,是首个通过纯 RL 激励大语言模型推理能力的公开研究。
- 引入改进管道:开发 DeepSeek-R1 的管道包含两个 RL 阶段和两个 SFT 阶段,旨在发现更好的推理模式并与人类偏好对齐。
模型蒸馏
- 小模型也强大:证明了大模型的推理模式可以蒸馏到小模型中,开源的 DeepSeek-R1 及其 API 有助于研究社区未来蒸馏出更好的小模型。
- 微调密集模型:使用 DeepSeek-R1 生成的推理数据微调了几个在研究社区广泛使用的密集模型,开源了基于 Qwen2.5 和 Llama3 系列的 1.5B、7B、8B、14B、32B 和 70B 检查点。
📦 安装指南
DeepSeek-R1 模型
有关在本地运行 DeepSeek-R1 的更多信息,请访问 DeepSeek-V3 仓库。
注意: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 轻松启动服务:
python3 -m sglang.launch_server --model deepseek-ai/DeepSeek-R1-Distill-Qwen-32B --trust-remote-code --tp 2
💻 使用示例
基础用法
使用 vLLM 启动 DeepSeek-R1-Distill-Qwen-32B 服务:
vllm serve deepseek-ai/DeepSeek-R1-Distill-Qwen-32B --tensor-parallel-size 2 --max-model-len 32768 --enforce-eager
高级用法
使用 SGLang 启动 DeepSeek-R1-Distill-Qwen-32B 服务:
python3 -m sglang.launch_server --model deepseek-ai/DeepSeek-R1-Distill-Qwen-32B --trust-remote-code --tp 2
📚 详细文档
模型下载
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 生成的样本。我们对其配置和分词器进行了轻微修改,请使用我们的设置来运行这些模型。
评估结果
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 |
使用建议
为了在使用 DeepSeek-R1 系列模型(包括基准测试)时达到预期性能,我们建议遵循以下配置:
- 将温度设置在 0.5 - 0.7 范围内(建议 0.6),以防止出现无限重复或输出不连贯的问题。
- 避免添加系统提示;所有指令应包含在用户提示中。
- 对于数学问题,建议在提示中包含指令,如:“请逐步推理,并将最终答案放在 \boxed{} 内。”
- 在评估模型性能时,建议进行多次测试并取结果的平均值。
此外,我们观察到 DeepSeek-R1 系列模型在回答某些查询时倾向于跳过思考模式(即输出 "<think>\n\n</think>"),这可能会对模型性能产生不利影响。
为确保模型进行全面推理,建议在每个输出的开头强制模型以 "<think>\n" 开始响应。
🔧 技术细节
模型训练
- DeepSeek-R1-Zero:通过大规模强化学习(RL)在基础模型上进行训练,不依赖有监督微调(SFT)。这种方法使模型能够探索思维链(CoT)来解决复杂问题,展现出自我验证、反思和生成长 CoT 等能力。
- DeepSeek-R1:在 RL 之前引入冷启动数据,解决了 DeepSeek-R1-Zero 存在的无限重复、可读性差和语言混合等问题,进一步提升了推理性能。
模型架构
DeepSeek-R1 和 DeepSeek-R1-Zero 基于 DeepSeek-V3-Base 进行训练,采用混合专家(MoE)架构,激活参数数量为 37B,总参数数量为 671B。
📄 许可证
本代码仓库和模型权重遵循 MIT 许可证。
DeepSeek-R1 系列支持商业使用,允许进行任何修改和衍生作品,包括但不限于蒸馏训练其他大语言模型。请注意:
- DeepSeek-R1-Distill-Qwen-1.5B、DeepSeek-R1-Distill-Qwen-7B、DeepSeek-R1-Distill-Qwen-14B 和 DeepSeek-R1-Distill-Qwen-32B 源自 Qwen-2.5 系列,原许可证为 Apache 2.0 许可证,现使用 DeepSeek-R1 精心策划的 800k 样本进行微调。
- DeepSeek-R1-Distill-Llama-8B 源自 Llama3.1-8B-Base,原许可证为 llama3.1 许可证。
- DeepSeek-R1-Distill-Llama-70B 源自 Llama3.3-70B-Instruct,原许可证为 llama3.3 许可证。
引用
@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},
}
联系我们
如果您有任何问题,请提出问题或通过 service@deepseek.com 联系我们。



