GLM-4 icon indicating copy to clipboard operation
GLM-4 copied to clipboard

GLM-Z1-32B-0414 vLLM部署 reasoning 有问题

Open jifa513 opened this issue 8 months ago • 4 comments

System Info / 系統信息

部署参数如下: python3 -m vllm.entrypoints.openai.api_server --disable-log-requests --host 0.0.0.0 --port 8080 --model THUDM/GLM-Z1-32B-0414 --served-model-name thudm/glm-z1-32b-0414 --max-num-seqs 16 --gpu-memory-utilization 0.92 --max-model-len 32768 --tensor-parallel-size 1 --chat-template-content-format auto --enable-prefix-caching --enable-chunked-prefill --enable-auto-tool-choice --tool-call-parser pythonic

得到的响应 reasoning 标签只有一半,导致结果无法正确识别哪些是思考部分哪些是回答部分

Image

Who can help? / 谁可以帮助到您?

No response

Information / 问题信息

  • [ ] The official example scripts / 官方的示例脚本
  • [ ] My own modified scripts / 我自己修改的脚本和任务

Reproduction / 复现过程

部署参数如下: python3 -m vllm.entrypoints.openai.api_server --disable-log-requests --host 0.0.0.0 --port 8080 --model THUDM/GLM-Z1-32B-0414 --served-model-name thudm/glm-z1-32b-0414 --max-num-seqs 16 --gpu-memory-utilization 0.92 --max-model-len 32768 --tensor-parallel-size 1 --chat-template-content-format auto --enable-prefix-caching --enable-chunked-prefill --enable-auto-tool-choice --tool-call-parser pythonic

得到的响应 reasoning 标签只有一半,导致结果无法正确识别哪些是思考部分哪些是回答部分

Image

Expected behavior / 期待表现

有人遇到过同样的问题吗?这个要怎么解决?

jifa513 avatar May 12 '25 02:05 jifa513

我猜<\think>之间是思考部分,之后是回答部分吧

sixsixcoder avatar May 15 '25 02:05 sixsixcoder

我猜<\think>之间是思考部分,之后是回答部分吧

但是其他模型都是用 "<think>" 标签和 "</think>" 标签把思考部分包起来,这个模型的输出只有一个 "</think>" 标签,怎么才能让它把"<think>" 标签也输出来呢?

jifa513 avatar May 23 '25 07:05 jifa513

https://zhuanlan.zhihu.com/p/1903018254479384762 不知这篇文章所讲的是否有道理?

jifa513 avatar May 23 '25 07:05 jifa513

这个问题解决了吗?这个问题最大的影响是在通用llm工具(chat box \cherry studio)多轮会话时,无法剔除think标签包裹的思考内容,污染会话上下文。

luckfu avatar Sep 20 '25 05:09 luckfu