Skip to content

Commit

Permalink
Bump model_template to 16384 bytes to support larger chat templates.
Browse files Browse the repository at this point in the history
  • Loading branch information
dranger003 committed Dec 17, 2024
1 parent 05c3a44 commit 4a7f1f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22652,7 +22652,7 @@ int32_t llama_chat_apply_template(
if (tmpl == nullptr) {
GGML_ASSERT(model != nullptr);
// load template from model
std::vector<char> model_template(2048, 0); // longest known template is about 1200 bytes
std::vector<char> 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) {
Expand Down

0 comments on commit 4a7f1f7

Please sign in to comment.