From 25c6e82e7a1ad25a42b0894e87d9b5c557409516 Mon Sep 17 00:00:00 2001 From: slaren Date: Fri, 10 May 2024 14:28:01 +0200 Subject: [PATCH] llama : use n_vocab to differentiate between mistral 7B and llama3 8B (#7200) --- llama.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama.cpp b/llama.cpp index e7b3fd8b4..2f1123d4e 100644 --- a/llama.cpp +++ b/llama.cpp @@ -3860,7 +3860,7 @@ static void llm_load_hparams( switch (hparams.n_layer) { case 22: model.type = e_model::MODEL_1B; break; case 26: model.type = e_model::MODEL_3B; break; - case 32: model.type = hparams.n_head == hparams.n_head_kv ? e_model::MODEL_7B : e_model::MODEL_8B; break; // LLaMa 8B v3 uses GQA + case 32: model.type = hparams.n_vocab < 40000 ? e_model::MODEL_7B : e_model::MODEL_8B; break; case 40: model.type = e_model::MODEL_13B; break; case 48: model.type = e_model::MODEL_34B; break; case 60: model.type = e_model::MODEL_30B; break;