QwenLM / Qwen2.5

Qwen2.5 is the large language model series developed by Qwen team, Alibaba Cloud.
9.72k stars 601 forks source link

[Bug]: Qwen 2.5 tool calls change function names after response #1012

Open LuckLittleBoy opened 1 month ago

LuckLittleBoy commented 1 month ago

Model Series

Qwen2.5

What are the models used?

Qwen2.5-7B-Instruct

What is the scenario where the problem happened?

deployment with vllm, tool calling with ollama

Is this a known issue?

Information about environment

OS: Linux Python: 3.10.12 PyTorch: 2.4.0+cpu vLLM: v0.6.1.post2 Ollama: 0.3.10

Log output

request tool function name is cInBMXzQGq58, but response tool function name changed to cInBMXzQz58

Description

Ollama

ollama request:

curl http://localhost:11434/v1/chat/completions -d '{ "model": "qwen2.5", "temperature": 0.01, "max_tokens": 2000, "stream": false, "messages": [ { "role": "user", "content": "系统状态" } ], "tools": [ { "type": "function", "function": { "name": "cInBMXzQGq58", "description": "系统状态方面", "parameters": { "type": "object", "properties": {}, "required": [] } } } ], "tool_choice": "auto" }'

ollama response:

{ "id": "chatcmpl-724", "object": "chat.completion", "created": 1728697253, "model": "qwen2.5", "system_fingerprint": "fp_ollama", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "", "tool_calls": [ { "id": "call_l565rajv", "type": "function", "function": { "name": "cInBMXzQz58", "arguments": "{}" } } ] }, "finish_reason": "tool_calls" } ], "usage": { "prompt_tokens": 151, "completion_tokens": 23, "total_tokens": 174 } }

vLLM

vLLM request:

image

vLLM response:

image

LuckLittleBoy commented 1 month ago

@JianxinMa 这是不是模型的问题

jklj077 commented 1 month ago

why this name?

LuckLittleBoy commented 1 month ago

why this name?

A random ID generated in the fastgpt program. qwen2 does not have this issue

github-actions[bot] commented 5 days ago

This issue has been automatically marked as inactive due to lack of recent activity. Should you believe it remains unresolved and warrants attention, kindly leave a comment on this thread.