add alias for chat template (#5858)

This commit is contained in:
Xuan Son Nguyen 2024-03-04 12:22:08 +01:00 committed by GitHub
parent a0fc62661f
commit 4ffcdce2ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 7 deletions

View file

@ -413,7 +413,7 @@ struct llama_server_context
int res = llama_chat_apply_template(model, nullptr, chat, 1, true, buf.data(), buf.size());
if (res < 0) {
LOG_ERROR("The chat template comes with this model is not yet supported, falling back to chatml. This may cause the model to output suboptimal responses", {});
sparams.chat_template = "<|im_start|>"; // llama_chat_apply_template only checks if <|im_start|> exist in the template
sparams.chat_template = "chatml";
}
}