From 919fe432c3961de9c001cce25d6083b4bfef6f2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?DAN=E2=84=A2?= Date: Tue, 17 Dec 2024 11:02:26 -0500 Subject: [PATCH] Bump model_template to 16384 bytes to support larger chat templates. --- src/llama.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llama.cpp b/src/llama.cpp index 1cc8a9332..cae86124b 100644 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -22652,7 +22652,7 @@ int32_t llama_chat_apply_template( if (tmpl == nullptr) { GGML_ASSERT(model != nullptr); // load template from model - std::vector model_template(2048, 0); // longest known template is about 1200 bytes + std::vector model_template(16384, 0); // longest known template is about 12792 bytes std::string template_key = "tokenizer.chat_template"; int32_t res = llama_model_meta_val_str(model, template_key.c_str(), model_template.data(), model_template.size()); if (res < 0) {