DeepSeek-R1-0528:小更新大升级

本文涉及的产品
交互式建模 PAI-DSW,每月250计算时 3个月
模型在线服务 PAI-EAS,A10/V100等 500元 1个月
模型训练 PAI-DLC,100CU*H 3个月
简介: 今天,DeepSeek R1 开源发布了其“小版本”升级——DeepSeek-R1-0528。

今天,DeepSeek R1 开源发布了其“小版本”升级——DeepSeek-R1-0528。

在最新迭代中,DeepSeek-R1 通过增强计算资源配置与引入后训练阶段的算法优化机制,显著提升了深度推理能力。DeepSeek-R1-0528 在各项基准评估中表现出色,包括数学、编程和一般逻辑方面,综合性能已逼近O3、Gemini 2.5 Pro等领先模型。

和之前的版本相比,升级后的模型在处理复杂推理任务方面有了显著改进。例如,在 AIME 2025 测试中,模型的准确率从之前的 70% 提高到 87.5%。这一进步源于推理过程中思考深度的增强——在 AIME 测试集中,之前的模型平均每题使用 12K 个tokens,而新版本平均使用 23K 个tokens。

除了改进推理能力外,此版本还减少了幻觉现象,增强了对函数调用的支持,并提升了代码编写体验。

同时,研究团队蒸馏 DeepSeek-R1-0528 的思维链后训练 Qwen3-8B Base 得到了 DeepSeek-R1-0528-Qwen3-8B,在数学测试 AIME 2024 中仅次于 DeepSeek-R1-0528。

DeepSeek-R1-0528 与之前的 DeepSeek-R1 使用同样的 base 模型,仅改进了后训练方法。私有化部署时只需更新 checkpoint 和 tokenizer_config.json(tool calls 相关变动)。模型参数为 685B(其中 14B 为 MTP 层),开源版本上下文长度为 128K(网页端、App 和 API 提供 64K 上下文)。

模型链接:

  • DeepSeek-R1-0528

https://modelscope.cn/models/deepseek-ai/DeepSeek-R1-0528

  • DeepSeek-R1-0528-Qwen3-8B

https://www.modelscope.cn/models/deepseek-ai/DeepSeek-R1-0528-Qwen3-8B

与旧版本 DeepSeek-R1 保持一致,此次开源仓库(包括模型权重)仍然统一采用 MIT License,并允许用户利用模型输出、通过模型蒸馏等方式训练其他模型。

01.评估结果

对于评估的所有模型,最大生成长度设定为64K token。在需要进行采样的基准测试中,采用温度系数0.6、top-p值0.95的配置,并通过每个查询生成16个响应来估算pass@1指标。

注意:研究团队使用无代理框架在SWE-Verified上评估模型性能。在HLE测试集中仅评估纯文本提示。在Tau-bench评估中,GPT-4.1被用来扮演用户角色。

DeepSeek-R1-0528-Qwen3-8B

研究团队将DeepSeek-R1-0528的思维链提炼出来,用于后训练Qwen3-8B Base,得到 DeepSeek-R1-0528-Qwen3-8B。该模型在AIME 2024开源模型中达到了SOTA性能,比Qwen3 8B高出10.0%,达到与Qwen3-235B-thinking相同的性能。研究团队认为,DeepSeek-R1-0528的思维链对于推理模型的学术研究和专注于小规模模型的工业开发都具有重要意义。

02.模型体验

  • 在DeepSeek官方网站上直接体验:

https://chat.deepseek.com (打开"DeepThink"按钮)

  • 在DeepSeek平台上使用与OpenAI兼容的API服务:

https://platform.deepseek.com

03.模型推理

DeepSeek-R1-0528-Qwen3-8B

可采用与Qwen相同的推理方式

vLLM:

VLLM_USE_MODELSCOPE=true vllm serve deepseek-ai/DeepSeek-R1-0528-Qwen3-8B --tensor-parallel-size 2 --max-model-len 32768 --enforce-eager

SGLang:

SGLANG_USE_MODELSCOPE=true python3 -m sglang.launch_server --model deepseek-ai/DeepSeek-R1-0528-Qwen3-8B --trust-remote-code --tp 2

DeepSeek-R1-0528

可参考DeepSeek-R1仓库进行DeepSeek-R1-0528的本地推理

https://github.com/deepseek-ai/DeepSeek-R1

与之前的DeepSeek-R1版本相比,DeepSeek-R1-0528的使用建议有以下变化:1.支持System prompt

2.不再需要在输出开始处添加"\n"来强制模型进入思考模式

DeepSeek-R1-0528-Qwen3-8B的模型架构与Qwen3-8B相同,但它的分词器配置与DeepSeek-R1-0528相同,可采用与Qwen3-8B完全相同的运行方式执行。

System prompt

在官方网页/应用中,使用带有特定日期的系统提示

该助手为DeepSeek-R1,由深度求索公司创造。
今天是{current date}。

例如

该助手为DeepSeek-R1,由深度求索公司创造。
今天是2025年5月28日,星期一。

Temperature

在官方网页/应用中,温度参数设置为0.6

文件上传和Web Search的提示

文件上传:按照模板创建提示,其中 {file_name}、{file_content} 和 {question} 是参数。

file_template = \
"""[file name]: {file_name}
[file content begin]
{file_content}
[file content end]
{question}"""

Web Search:{search_results}、{cur_date} 和 {question} 是参数。

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

英文查询:

search_answer_en_template = \
'''# 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&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}'''

04.模型微调

我们介绍使用ms-swift 对 DeepSeek-R1-0528-Qwen3-8B进行自我认知微调,向大家提供微调参考。ms-swift是魔搭社区官方提供的大模型与多模态大模型训练部署框架。

ms-swift开源地址:https://github.com/modelscope/ms-swift

在开始微调之前,请确保您的环境已准备妥当。

git clone https://github.com/modelscope/ms-swift.git
cd ms-swift
pip install -e .
pip install liger-kernel transformers -U

微调数据集准备格式如下(system字段可选),在训练脚本中指定`--dataset <dataset_path>`即可。

{"messages": [{"role": "user", "content": "浙江的省会在哪?"}, {"role": "assistant", "content": "<think>\nxxx\n</think>\n浙江的省会在杭州。"}]}

不带思考的数据集,你可以在训练时额外指定`--loss_scale ignore_empty_think`,忽略正则为`<think>\s*</think>\s*`的损失计算,避免思考能力的丢失。

{"messages": [{"role": "user", "content": "浙江的省会在哪?"}, {"role": "assistant", "content": "<think>\n\n</think>\n浙江的省会在杭州。"}]}

对DeepSeek-R1-0528-Qwen3-8B进行10分钟快速自我认知微调脚本如下,可在魔搭提供的免费算力A10中运行

https://modelscope.cn/my/mynotebook

数据集介绍:

  • swift/DeepSeek-R1-Qwen3-8B-Distill: 使用DeepSeek-R1-0528-Qwen3-8B蒸馏的20000条数据,用于保持通用能力。
  • swift/self-cognition:empty_think: 自我认知数据集,设置`--model_author swift --model_name swift-robot`替换自我认知数据集中的通配符,并在数据集前加上`<think>\n\n</think>\n\n`前缀。
# 训练显存:18GB
CUDA_VISIBLE_DEVICES=0 \
swift sft \
    --model deepseek-ai/DeepSeek-R1-0528-Qwen3-8B \
    --train_type lora \
    --dataset 'swift/DeepSeek-R1-Qwen3-8B-Distill#1800' \
              'swift/self-cognition:empty_think#600' \
    --loss_scale ignore_empty_think \
    --torch_dtype bfloat16 \
    --num_train_epochs 1 \
    --per_device_train_batch_size 1 \
    --per_device_eval_batch_size 1 \
    --learning_rate 1e-4 \
    --lora_rank 8 \
    --lora_alpha 32 \
    --target_modules all-linear \
    --gradient_accumulation_steps 16 \
    --load_from_cache_file false \
    --eval_steps 50 \
    --save_steps 50 \
    --save_total_limit 2 \
    --logging_steps 5 \
    --max_length 2048 \
    --output_dir output \
    --warmup_ratio 0.05 \
    --dataloader_num_workers 4 \
    --use_liger_kernel true \
    --model_author swift \
    --model_name swift-robot

训练显存占用:

训练完成后,使用以下命令对训练时的验证集进行推理:

CUDA_VISIBLE_DEVICES=0 \
swift infer \
    --adapters output/vx-xxx/checkpoint-xxx \
    --stream true \
    --temperature 0 \
    --max_new_tokens 2048

推送模型到ModelScope:

CUDA_VISIBLE_DEVICES=0 \
swift export \
    --adapters output/vx-xxx/checkpoint-xxx \
    --push_to_hub true \
    --hub_model_id '<your-model-id>' \
    --hub_token '<your-sdk-token>'

点击阅读原文,直达模型详情~

https://modelscope.cn/models/deepseek-ai/DeepSeek-R1-0528

目录
相关文章
|
16天前
|
机器学习/深度学习 算法 测试技术
DeepSeek-R1-0528:小更新大升级
今天,DeepSeek R1 开源发布了其“小版本”升级——DeepSeek-R1-0528。
290 24
|
17天前
|
人工智能 监控 Serverless
MCP Server On FC 之旅第 4 站:长连接闲置计费最高降低 87% 成本的技术内幕
函数计算(FC)是阿里云的全托管计算服务,支持事件驱动模式。用户无需管理基础设施,只需上传代码或镜像即可运行任务,并享有日志查询、性能监控等功能。针对MCP Server场景,FC通过MCP Runtime实现开源Stdio MCP Server的一键托管,解决了Session会话保持问题,并推出长连接闲置计费能力,按实际使用收费,最高可降低87%的成本。此外,FC还提供亲和性调度及Websocket长请求的闲置计费支持,帮助用户优化资源利用与成本。
150 69
|
6天前
|
机器学习/深度学习 数据采集 并行计算
面壁小钢炮MiniCPM 4.0开源,端侧推理常规提速5倍!
面壁智能重磅推出MiniCPM 4.0 ——一个极致高效的端侧大模型,通过其 CPM.cu 自研推理框架,可实现220倍极致的速度提升,5 倍常规提速。
215 14
|
15天前
|
人工智能 小程序 API
DeepSeek‑R1-0528 重磅升级:蚂蚁百宝箱免费、无限量调用
DeepSeek-R1-0528 版本重磅升级,推理能力显著增强,在数学、编程和通用逻辑等基准测评中表现卓越,媲美国际顶尖模型。此次更新提供免费、无限量调用通道——蚂蚁百宝箱,用户可通过简单五步构建智能体并发布至多端平台。模型基于 DeepSeek V3 Base,参数规模达 685B,上下文长度最高支持 128K,助力开发者快速嵌入顶尖推理能力,打造创新应用。立即访问蚂蚁百宝箱体验!
144 11
|
1月前
|
数据可视化 API Swift
全模态图像模型Nexus-Gen对齐GPT-4o!同时搞定,数据、训练框架、模型全面开源
OpenAI GPT-4o发布强大图片生成能力后,业界对大模型生图能力的探索向全模态方向倾斜,训练全模态模型成研发重点。
158 17
|
6天前
|
数据采集 自然语言处理 搜索推荐
基于Qwen3的Embedding和Rerank模型系列,开源!
近年来,随着大规模预训练语言模型(LLM)的飞速发展,文本嵌入(Embedding)和重排序(Reranking)技术在搜索引擎、问答系统、推荐系统等多个领域的重要性愈发凸显。
757 75
|
3天前
|
人工智能 物联网
“一丹一世界”三等奖 |咖菲猫咪_商业海报案例分享
“一丹一世界”三等奖 |咖菲猫咪_商业海报案例分享
115 77
|
16天前
|
人工智能 弹性计算 自然语言处理
Bolt.diy:AI全栈开发,一句话生成网站
Bolt.diy是一个AI驱动的Web开发工具,支持通过自然语言Prompt直接生成、编辑和部署全栈应用,无需本地环境配置。本次实验基于DeepSeek于2025年5月28日发布了DeepSeek-R1-0528升级版本,显著提升了编程能力。
Bolt.diy:AI全栈开发,一句话生成网站

热门文章

最新文章