Skip to content

Commit 4a7f1f7

Browse files
committed
Bump model_template to 16384 bytes to support larger chat templates.
1 parent 05c3a44 commit 4a7f1f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/llama.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22652,7 +22652,7 @@ int32_t llama_chat_apply_template(
2265222652
if (tmpl == nullptr) {
2265322653
GGML_ASSERT(model != nullptr);
2265422654
// load template from model
22655-
std::vector<char> model_template(2048, 0); // longest known template is about 1200 bytes
22655+
std::vector<char> model_template(16384, 0); // longest known template is about 12792 bytes
2265622656
std::string template_key = "tokenizer.chat_template";
2265722657
int32_t res = llama_model_meta_val_str(model, template_key.c_str(), model_template.data(), model_template.size());
2265822658
if (res < 0) {

0 commit comments

Comments
 (0)