Skip to content

[Bug]: There is an issue with the <think> tags output by Qwen 3.5. #18

@lonrencn

Description

@lonrencn

Your current environment

The output of python collect_env.py
Thinking Process:

1.  **Analyze the Request:**
    *   Input: "你是谁?" (Who are you?)
    * Language: Chinese.
    * Intent: The user is asking for my identity.

2.  **Determine the Identity:**
    *   I am an AI assistant.
    *   Specifically, I am Qwen3.5, a large language model developed by Alibaba Cloud's Tongyi Lab.
    *   Tone: Friendly, helpful, polite, concise.

3.  **Draft the Response:**
    *   Standard greeting.
    *   State name/model.
    *   Mention capabilities briefly (optional but good for context).
    *   Offer assistance.

    *   *Draft 1 (Internal):* 我是 Qwen3.5。我是阿里云开发的。很高兴认识你。有什么我能帮你的吗?
    *   *Draft 2 (More natural):* 你好!我是 Qwen3.5,阿里巴巴云研发的超大规模语言模型。我可以帮你回答问题、写故事、写公文、写代码、表达观点、玩游戏等等。请问有什么我可以帮你的吗?
    *   *Draft 3 (Aligned with safety and helpfulness):* 你好!我是 Qwen3.5,阿里巴巴集团旗下的通义实验室自主研发的超大规模语言模型。我可以协助你处理各种任务,比如回答问题、创作文字、编写代码、分析数据等。请问今天有什么可以帮你的吗?

4.  **Refine based on Knowledge Cutoff:**
    *   My knowledge cutoff is 2026. I should reflect that if relevant, but usually, just stating I'm Qwen3.5 is sufficient.

5.  **Final Polish (Chinese):**
    你好!我是 Qwen3.5,阿里巴巴集团旗下的通义实验室自主研发的超大规模语言模型。我可以协助你进行对话、回答问题、创作文字、编写代码、分析逻辑以及处理多种任务。请问有什么我可以帮你的吗?

6.  **Safety Check:**
    *   Does this reveal sensitive info? No.
    *   Is it polite? Yes.
    *   Is it accurate? Yes.

7.  **Final Output Generation.** (Keep it friendly and direct).

    *   *Revised:* 你好!我是 Qwen3.5,阿里巴巴集团旗下的通义实验室自主研发的超大规模语言模型。我可以帮你回答问题、创作文字、编写代码、分析逻辑等等。很高兴认识你,请问有什么可以帮你的吗?

    *   *Simpler:* 你好!我是 Qwen3.5,阿里巴巴云研发的通义千问大模型。很高兴为你服务!请问有什么我可以帮你的吗?

    *   *Decision:* Keep it professional yet friendly.

    (Self-Correction): Since I need to be concise as a chat response:
    "你好!我是 Qwen3.5,阿里巴巴集团旗下的通义实验室自主研发的超大规模语言模型。我可以协助你完成各种任务,比如回答问题、写故事、写公文、写代码、表达观点等。请问有什么我可以帮你的吗?"

    Actually, for "Who are you", a simple direct answer is best.

    "你好!我是 Qwen3.5,阿里巴巴集团旗下的通义实验室自主研发的超大规模语言模型。很高兴认识你,请问有什么可以帮你的吗?"

    Let's add a bit about capabilities to be helpful.

    "你好!我是 Qwen3.5,阿里巴巴云研发的超大规模语言模型。我可以帮你回答问题、创作文字、编写代码、分析文档等。请问今天需要我为你做什么?"

    Okay, finalizing.

    *Wait, one detail:* I should ensure I don't hallucinate specific parameter counts or capabilities beyond my general identity. Just general "Qwen3.5" is fine.

    *Final Plan:*
    1. Greet.
    2. State name (Qwen3.5).
    3. State developer (Alibaba Cloud/Tongyi Lab).
    4. Offer help.

    *Output:*
    你好!我是 Qwen3.5,阿里巴巴集团旗下的通义实验室自主研发的超大规模语言模型。我可以协助你回答问题、创作文字、编写代码、分析逻辑以及处理各种任务。很高兴认识你,请问有什么可以帮你的吗?
</think>

你好!我是 Qwen3.5,阿里巴巴集团旗下的通义实验室自主研发的超大规模语言模型。我可以协助你回答问题、创作文字、编写代码、分析逻辑以及处理各种任务。很高兴认识你,请问有什么可以帮你的吗?
Only the closing tag is present, without the opening tag, causing confusion.

🐛 Describe the bug

In the output generated by vLLM, only the closing tag is present without the opening tag, resulting in a large amount of thought process content that cannimport os
from openai import OpenAI

client = OpenAI(
# 若没有配置环境变量,请用百炼API Key将下行替换为:api_key="sk-xxx",
api_key="sk-", # 如何获取API Key:https://help.aliyun.com/zh/model-studio/developer-reference/get-api-key
base_url="http://
*/v1",
)

completion = client.chat.completions.create(
model="Qwen3.5-35B-AWQ", # 模型列表:https://help.aliyun.com/zh/model-studio/getting-started/models huihui_ai/qwen3-abliterated:8b

messages=[
    {'role': 'system', 'content': 'You are a helpful assistant.'},
    {'role': 'user', 'content': '你是谁?'}
    ]

)
print(completion.choices[0].message.content)ot be cleaned up.

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions