GitCode 模型页采集
DeepSeek-V4-Flash-0731:面向代码生成与智能代理的高效模型
可用于代码生成、智能代理等场景,具备强大的agentic能力,集成推测解码模块,支持多推理努力级别,在多项基准测试中表现优异,兼容vLLM部署。【此简介由AI生成】
项目概览
| 模型名称 | DeepSeek-V4-Flash-0731 |
|---|---|
| 仓库路径 | hf_mirrors/deepseek-ai/DeepSeek-V4-Flash-0731 |
| GitCode ID | 10500728 |
| 开源协议 | MIT_License |
| README 大小 | 7042 bytes |
| 正文规模 | 3311 字符 |
README 正文
DeepSeek-V4-Flash-0731
简介
DeepSeek-V4-Flash-0731 是 DeepSeek-V4-Flash 的正式版本,取代了预览版,并显著增强了智能体能力。它与 DeepSeek-V4-Flash-DSpark 具有相同的模型结构,即附带了一个推测解码模块。
尽管 DeepSeek-V4-Flash-0731 的激活参数数量远小于 DeepSeek-V4-Pro (Preview),但在以下列出的基准测试中,其性能仍超越了后者,并且与现有的最强专有模型具有广泛的竞争力。
| 基准测试 | DeepSeek-V4-Flash-0731 | DeepSeek-V4-Flash (Preview) | DeepSeek-V4-Pro (Preview) | GLM-5.2 | Opus-4.8 |
|---|---|---|---|---|---|
| Terminal Bench 2.1 | 82.7 | 61.8 | 72.1 | 81.0 | 85.0 |
| NL2Repo | 54.2 | 39.4 | 38.5 | 48.9 | 69.7 |
| Cybergym | 76.7 | 38.7 | 52.7 | - | 83.1 |
| DeepSWE | 54.4 | 7.3 | 12.8 | 46.2 | 58.0 |
| Toolathlon-Verified | 70.3 | 49.7 | 55.9 | 59.9 | 76.2 |
| Agents' Last Exam | 25.2 | 15.8 | 16.5 | 23.8 | 25.7 |
| AutomationBench Public | 25.1 | 10.8 | 12.8 | 12.9 | 27.2 |
| DSBench-FullStack † | 68.7 | 37.0 | 41.8 | 61.8 | 71.6 |
| DSBench-Hard † | 59.6 | 25.8 | 31.1 | 54.5 | 71.7 |
注:
- 对于上述公开基准测试中的代码智能体任务,DeepSeek-V4-Flash-0731 使用 DeepSeek Harness(即将发布)的最小模式作为智能体框架进行评估,采用
max推理努力级别,参数设置为temperature = 1.0,top_p = 0.95。 - † DSBench-FullStack 是一个内部全栈开发测试集;DSBench-Hard 是一个内部困难编码智能体问题测试集。
聊天模板
本版本不包含 Jinja 格式的聊天模板。相反,我们提供了一个专门的 encoding 文件夹,其中包含 Python 脚本和测试用例,展示了如何将 OpenAI 兼容格式的消息编码为模型的输入字符串,以及如何解析模型的文本输出。完整文档请参考 encoding 文件夹。
reasoning_effort 参数现在支持三个级别:low、high 和 max,用于控制模型在回答前的思考深度。
简单示例:
from encoding_dsv4 import encode_messages, parse_message_from_completion_text
messages = [
{"role": "user", "content": "hello"},
{"role": "assistant", "content": "Hello! I am DeepSeek.", "reasoning_content": "thinking..."},
{"role": "user", "content": "1+1=?"}
]
# messages -> string
prompt = encode_messages(messages, thinking_mode="thinking", reasoning_effort="max")
# string -> tokens
import transformers
tokenizer = transformers.AutoTokenizer.from_pretrained("deepseek-ai/DeepSeek-V4-Flash-0731")
tokens = tokenizer.encode(prompt)
如何使用 vLLM 运行
只需添加一个标志即可启用 DSpark 推测解码——在您的 vLLM 启动命令中添加 --speculative-config,并指定方法为 dspark:
--speculative-config '{"method":"dspark","num_speculative_tokens":7,"draft_sample_method":"greedy"}'
例如,以下命令在单个 4×GB300 节点上使用 vLLM 部署模型。 有关详细说明和其他硬件配置,请参见 vLLM 指南。
vllm serve deepseek-ai/DeepSeek-V4-Flash-0731
--trust-remote-code --kv-cache-dtype fp8 --block-size 256
--data-parallel-size 4 --enable-expert-parallel
--moe-backend deep_gemm_mega_moe
--attention-config '{"use_fp4_indexer_cache": true}'
--speculative-config '{"method":"dspark","num_speculative_tokens":7,"draft_sample_method":"greedy"}'
如何使用 SGLang 运行
通过 --speculative-algorithm DSPARK 启用 DSpark,并且无需单独设置 --speculative-draft-model-path,因为目标模型和草稿模型的权重均来自同一检查点。
有关详细说明、基准测试和其他硬件配置,请参见 SGLang 指南。
sglang serve
--trust-remote-code
--model-path deepseek-ai/DeepSeek-V4-Flash-0731
--tp 4
--moe-runner-backend flashinfer_mxfp4
--speculative-algorithm DSPARK
--mem-fraction-static 0.90
--chunked-prefill-size 4096
--swa-full-tokens-ratio 0.1
如何本地运行
有关本地运行DeepSeek-V4的详细说明,包括模型权重转换和交互式聊天演示,请参考inference文件夹。
对于本地部署,我们建议将采样参数设置为temperature = 1.0,在智能体场景下top_p = 0.95,其他场景下top_p = 1.0。对于“high”和“max”推理努力级别,我们建议最大输出长度为384K tokens。
许可证
本仓库和模型权重采用MIT许可证。
引用
@misc{deepseekai2026deepseekv4,
title={DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligence},
author={DeepSeek-AI},
year={2026},
}
联系方式
如有任何问题,请提交 issue 或通过 [email protected] 与我们联系。
相关文章
- 可可漫画官网客户端下载入口怎么进?可可漫画官网下载直达 08-03
- 微博网页版访问入口-微博电脑版官方登录页面入口地址 08-03
- Pragmata 在您所在时区何时发布 08-03
- 修修漫画在线看漫画入口页面-修修漫画网页版在线观看入口 08-03
- 不挂科在线搜题网页版入口-不挂科在线搜题网页版入口免登录 08-03
- 腾讯手游助手如何实现软件双开 08-03