跳转到内容

DeepSeek-V4-Flash

POST /v1/chat/completions model: DeepSeek-V4-Flash

这里跑的权重是 DeepSeek-V4-Flash-0731,DeepSeek 对 DeepSeek-V4-Flash 的正式发布版,取代此前的 预览版。官方把它定位为智能体(agentic)模型:在其模型卡公布的基准上,尽管激活参数量小得多,仍胜过 DeepSeek-V4-Pro(预览版)。配套技术报告题为 DeepSeek-V4: Towards Highly Efficient Million-Token Context IntelligencearXiv:2606.19348)。

取自随权重发布的 config.json

架构DeepseekV4ForCausalLMdeepseek_v4
层数43
隐藏维度4,096
注意力64 个 Q 头、1 个 KV 头 —— MLA,q_lora_rank 1,024,RoPE 分量 64 维
专家混合256 个路由专家 + 1 个共享,每 token 激活 6 个路由专家,专家中间维度 2,048
词表129,280
原生上下文1,048,576
多 token 预测1 层
量化FP8 e4m3,块大小 [128, 128],激活动态缩放
许可证MIT

百万 token 窗口是原生的——它就是 config 里的 max_position_embeddings,不是服务端加的 RoPE 外推。

模型卡建议 temperature = 1.0;智能体场景 top_p = 0.95,其余场景 top_p = 1.0。这两个参数本端点 都接受,可以照着用。

以下全部是对着线上端点实测的。与模型卡不一致的地方以端点为准——网关会先校验并重建请求,再送到推理 后端。

上下文长度1,048,576 token
输入模态仅文本
流式
工具调用✅(不支持并行调用)
JSON 输出json_object · ❌ json_schema
思考✅ —— 不主动要就不思考
稳定性experimental

不传 reasoning_effort 就不会思考。 基线请求返回的 reasoning 为空、reasoning_tokens 为 0。

模型卡写的是三档:lowhighmax。而本端点接受六个值,全部返回 200

minimallowmediumhighxhighmax
200200200200200200

但它们并不对应六种行为:minimal/low/medium 的思考量差不多,high/max 明显更长——实际两档, 和官方文档的三档大体吻合。

结果放在哪:

思考文本choices[0].message.reasoning
token 数usage.completion_tokens_details.reasoning_tokens
额外提供usage.reasoning_tokens —— 这个模型有顶层字段

我们测过的所有形状它都接受:

形状状态
system 在首位,后接 user200
system 出现在 user 轮之后200
system 在末尾200
两个 system 消息200
developer 代替 system200

Qwen3.8-Flash-Next 不是这样。要用一套 代码同时打两个模型,请按那个模型更严格的规则写。

你发的返回
max_tokens 超出窗口400 Requested token count exceeds the model's maximum context length of 1048576 tokens.
response_format: json_schema400 Model DeepSeek-V4-Flash does not support JSON schema output mode
content 里带 image_url400 Model DeepSeek-V4-Flash does not support image input.
thinking: {...}400 —— 请改用 reasoning_effort
Terminal window
curl https://developer.amd.com.cn/radeon/api/v1/chat/completions \
-H "Authorization: Bearer $RADEON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "DeepSeek-V4-Flash",
"reasoning_effort": "low",
"temperature": 1.0,
"top_p": 0.95,
"messages": [
{ "role": "system", "content": "用一句话回答。" },
{ "role": "user", "content": "天空为什么是蓝的?" }
]
}'