
在部署 Qwen3-VL-32B-Thinking 模型时,遇到了 reasoning_content 字段始终为空的问题。尽管模型能够正常生成推理内容,但无法正确分离推理过程和最终答案。
--reasoning-parser 参数的值api_server.py: error: argument --reasoning-parser: expected one argument<think>...</think> 标签的推理内容,但 reasoning_content 字段始终为 nullcontent 字段中,没有正确分离问题:--reasoning-parser 参数缺少值
--reasoning-parser # 错误:缺少参数值解决:添加 qwen3 作为参数值
--reasoning-parser qwen3通过测试发现:
<think>...</think> 标签完整reasoning_content 字段仍为 null关键发现:Qwen3-VL-32B-Thinking 模型的输出格式实际上遵循 DeepSeek-R1 格式,而不是标准的 Qwen3 格式。
正如文档所述:Qwen3-Thinking-2507 不输出
<think>起始标记,导致 Qwen3 推理解析器无法解析它,因为它符合 DeepSeek-R1 格式。
修改启动脚本:将 --reasoning-parser 从 qwen3 改为 deepseek_r1
# 修改前
--reasoning-parser qwen3
# 修改后
--reasoning-parser deepseek_r1nohup env SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt \
python -m vllm.entrypoints.openai.api_server \
--model /root/.cache/modelscope/hub/models/Qwen/Qwen3-VL-32B-Thinking \
--reasoning-parser deepseek_r1 \
--tensor-parallel-size 8 >log.txt 2>&1 &curl --location 'localhost:8000/v1/chat/completions' \
--header 'Content-Type: application/json' \
--data '{
"model": "/root/.cache/modelscope/hub/models/Qwen/Qwen3-VL-32B-Thinking",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "这张图片里有什么?"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/image.jpg"
}
}
]
}
],
"max_tokens": 1024,
"temperature": 0.7
}'deepseek_r1, glm45, openai_gptoss, granite, hunyuan_a13b, mistral, qwen3, seed_oss, step3enable_thinking=False--enable-reasoning 参数(该参数在 vLLM 0.11.0 中不存在)qwen3 解析器(格式不匹配)deepseek_r1 解析器原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。