Skip to content

Commit 2572689

Browse files
chat : fix hunyuan auto-detection (#15114)
Signed-off-by: stevenkuang <[email protected]>
1 parent 2241453 commit 2572689

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/llama-chat.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,11 @@ llm_chat_template llm_chat_detect_template(const std::string & tmpl) {
193193
return LLM_CHAT_TEMPLATE_LLAMA4;
194194
} else if (tmpl_contains("<|endofuserprompt|>")) {
195195
return LLM_CHAT_TEMPLATE_DOTS1;
196-
} else if (tmpl_contains("<|startoftext|>") && tmpl_contains("<|extra_4|>")) {
196+
} else if (tmpl_contains("<|extra_0|>") && tmpl_contains("<|extra_4|>")) {
197197
return LLM_CHAT_TEMPLATE_HUNYUAN_MOE;
198198
} else if (tmpl_contains("<|start|>") && tmpl_contains("<|channel|>")) {
199199
return LLM_CHAT_TEMPLATE_OPENAI_MOE;
200-
} else if (tmpl_contains("<|hy_place▁holder▁no▁2|>") && tmpl_contains("<|hy_place▁holder▁no▁3|>")) {
200+
} else if (tmpl_contains("<|hy_Assistant|>") && tmpl_contains("<|hy_place▁holder▁no▁3|>")) {
201201
return LLM_CHAT_TEMPLATE_HUNYUAN_DENSE;
202202
} else if (tmpl_contains("<|im_assistant|>assistant<|im_middle|>")) {
203203
return LLM_CHAT_TEMPLATE_KIMI_K2;

0 commit comments

Comments
 (0)