Skip to content

Commit 79e4db1

Browse files
authored
Merge pull request #37 from TAO71-AI/main
Fixed a small bug in the Qwen3-VL chat template.
2 parents 2efaa34 + eb4749c commit 79e4db1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)