Skip to content

Commit e539831

Browse files
committed
llama-model: fix broken tool calling prompt mistral-v7-tekken/Mistral Small
1 parent 9190da2 commit e539831

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/llama-model.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13783,14 +13783,7 @@ const char * llama_model_chat_template(const llama_model * model, const char * n
1378313783
: LLM_KV(model->arch)(LLM_KV_TOKENIZER_CHAT_TEMPLATE);
1378413784
const auto & it = model->gguf_kv.find(key);
1378513785
if (it == model->gguf_kv.end()) {
13786-
// one-off fix for very popular models (so we are not flooded with issues)
13787-
// do not extend this list unless absolutely necessary
13788-
// Mistral-Small-2503 does not have built-in chat template
13789-
llama_vocab_pre_type pre_type = model->vocab.get_pre_type();
13790-
if (pre_type == LLAMA_VOCAB_PRE_TYPE_TEKKEN && model->layers.size() == 40) {
13791-
return "mistral-v7-tekken";
13792-
}
13793-
13786+
LLAMA_LOG_WARN("llama_model_chat_template: Couldn't find chat template (tried key: %s).\n", key.c_str());
1379413787
return nullptr;
1379513788
}
1379613789

0 commit comments

Comments
 (0)