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 Intelligence(arXiv:2606.19348)。
取自随权重发布的 config.json:
| 架构 | DeepseekV4ForCausalLM(deepseek_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。这两个参数本端点
都接受,可以照着用。
本端点上的行为
Section titled “本端点上的行为”以下全部是对着线上端点实测的。与模型卡不一致的地方以端点为准——网关会先校验并重建请求,再送到推理 后端。
| 上下文长度 | 1,048,576 token |
| 输入模态 | 仅文本 |
| 流式 | ✅ |
| 工具调用 | ✅(不支持并行调用) |
| JSON 输出 | ✅ json_object · ❌ json_schema |
| 思考 | ✅ —— 不主动要就不思考 |
| 稳定性 | experimental |
不传 reasoning_effort 就不会思考。 基线请求返回的 reasoning 为空、reasoning_tokens 为 0。
模型卡写的是三档:low、high、max。而本端点接受六个值,全部返回 200:
minimal | low | medium | high | xhigh | max |
|---|---|---|---|---|---|
200 | 200 | 200 | 200 | 200 | 200 |
但它们并不对应六种行为:minimal/low/medium 的思考量差不多,high/max 明显更长——实际两档,
和官方文档的三档大体吻合。
结果放在哪:
| 思考文本 | choices[0].message.reasoning |
| token 数 | usage.completion_tokens_details.reasoning_tokens |
| 额外提供 | usage.reasoning_tokens —— 这个模型有顶层字段 |
messages
Section titled “messages”我们测过的所有形状它都接受:
| 形状 | 状态 |
|---|---|
system 在首位,后接 user | 200 |
system 出现在 user 轮之后 | 200 |
system 在末尾 | 200 |
两个 system 消息 | 200 |
用 developer 代替 system | 200 |
但 Qwen3.8-Flash-Next 不是这样。要用一套 代码同时打两个模型,请按那个模型更严格的规则写。
| 你发的 | 返回 |
|---|---|
max_tokens 超出窗口 | 400 Requested token count exceeds the model's maximum context length of 1048576 tokens. |
response_format: json_schema | 400 Model DeepSeek-V4-Flash does not support JSON schema output mode |
content 里带 image_url | 400 Model DeepSeek-V4-Flash does not support image input. |
thinking: {...} | 400 —— 请改用 reasoning_effort |
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": "天空为什么是蓝的?" } ] }'