Skip to content

Commit 25c6e82

Browse files
authored
llama : use n_vocab to differentiate between mistral 7B and llama3 8B (#7200)
1 parent 4e38809 commit 25c6e82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llama.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3860,7 +3860,7 @@ static void llm_load_hparams(
38603860
switch (hparams.n_layer) {
38613861
case 22: model.type = e_model::MODEL_1B; break;
38623862
case 26: model.type = e_model::MODEL_3B; break;
3863-
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
3863+
case 32: model.type = hparams.n_vocab < 40000 ? e_model::MODEL_7B : e_model::MODEL_8B; break;
38643864
case 40: model.type = e_model::MODEL_13B; break;
38653865
case 48: model.type = e_model::MODEL_34B; break;
38663866
case 60: model.type = e_model::MODEL_30B; break;

0 commit comments

Comments
 (0)