模型概述
模型特點
模型能力
使用案例
🚀 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 聯繫我們。



