Update src/llama.cpp

Co-authored-by: Xuan Son Nguyen <thichthat@gmail.com>
This commit is contained in:
Molly Sophia 2024-10-22 20:26:45 +08:00 committed by GitHub
parent facec466e8
commit 1135b0f816
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -21698,6 +21698,7 @@ static int32_t llama_chat_apply_template_internal(
ss << "[|assistant|]";
}
} else if (tmpl == "rwkv-world" || tmpl_contains("rwkv-world")) {
// this template requires the model to have "\n\n" as EOT token
for (auto message : chat) {
std::string role(message->role);
if (role == "user") {