From 95e25a6c1f24aabd70f3403a6efc7718a1376fde Mon Sep 17 00:00:00 2001 From: Molly Sophia Date: Mon, 21 Oct 2024 16:29:56 +0800 Subject: [PATCH] RWKV: Fix the chat template not being used Signed-off-by: Molly Sophia --- src/llama.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llama.cpp b/src/llama.cpp index a7555d937..8cd630aeb 100644 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -21734,7 +21734,7 @@ static int32_t llama_chat_apply_template_internal( if (add_ass) { ss << "[|assistant|]"; } - } else if (tmpl == "rwkv-world" || tmpl_contains("'User: ' + message['content'] + '\n\nAssistant:'")) { + } else if (tmpl == "rwkv-world" || tmpl_contains("rwkv-world") || tmpl_contains("'User: ' + message['content'] + '\n\nAssistant:'")) { for (auto message : chat) { std::string role(message->role); if (role == "user") {