Skip to content

Commit eb4749c

Browse files
committed
Fixed a small bug in the Qwen3-VL chat template.
1 parent 2efaa34 commit eb4749c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

llama_cpp/llama_chat_format.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4046,7 +4046,7 @@ class Qwen3VLChatHandler(Llava15ChatHandler):
40464046
"{{- '\n' -}}"
40474047
"{{- tool | tojson -}}"
40484048
"{%- endfor -%}"
4049-
"{{- '\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <arguments-json-object>}\n</tool_call>\n\nYou can also return a response for the user alongside a function call:\n<response-for-user>\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <arguments-json-object>}\n</tool_call>' -}}"
4049+
"{{- '\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <arguments-json-object>}\n</tool_call>\n\nYou can also return a response for the user alongside a function call:\nRESPONSE FOR THE USER HERE\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <arguments-json-object>}\n</tool_call>' -}}"
40504050
"{%- endif -%}"
40514051
"{{- '<|im_end|>\n' -}}"
40524052
"{%- set image_count = namespace(value=0) -%}"
@@ -4108,7 +4108,7 @@ class Qwen3VLChatHandler(Llava15ChatHandler):
41084108
"{%- endif -%}"
41094109
"{%- endfor -%}"
41104110
"{%- if add_generation_prompt -%}"
4111-
"{{- '<im_start>assistant\n' -}}"
4111+
"{{- '<|im_start|>assistant\n' -}}"
41124112
"{%- if force_reasoning -%}"
41134113
"{{- '<think>\n' -}}"
41144114
"{%- endif -%}"

0 commit comments

Comments
 (0)