Skip to content

训练qwen3.6的tool_call时prompt拼接方式与模型原生拼接方式不一致 #10491

Description

@ArnoTeng

Reminder

  • I have read the above rules and searched the existing issues.

System Info

从训练日志可见 system内容出现tools定义前面,而从qwen3.6-27B的chat_template.jinja 文件可见tools定义应插入在system内容前面。
模型用vllm部署,vllm按chat_template.jinja拼接prompt,因此训练和推理时不一致。

引起不一致的llama-factory的源码为:LLaMA-Factory/src/llamafactory/data/template.py中的:
elements += self.format_system.apply(content=(system + tool_text))

请问这种是bug吗?

Reproduction

Others

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpendingThis problem is yet to be addressed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions