Skip to content

Commit e8a1073

Browse files
committed
fix(llama.cpp): Determine granite language 3b instruct by vocab size
Branch: GraniteLM Signed-off-by: Gabe Goodhart <[email protected]>
1 parent 2ec91ee commit e8a1073

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
@@ -5401,7 +5401,7 @@ static void llm_load_hparams(
54015401
// granite uses a vocab with len 49152
54025402
case 32: model.type = hparams.n_vocab == 49152 ? e_model::MODEL_3B : (hparams.n_vocab < 40000 ? e_model::MODEL_7B : e_model::MODEL_8B); break;
54035403
case 36: model.type = e_model::MODEL_8B; break; // granite
5404-
case 40: model.type = hparams.n_vocab == 49152 ? e_model::MODEL_3B : e_model::MODEL_13B; break;
5404+
case 40: model.type = (hparams.n_vocab == 49152 || hparams.n_vocab == 49156) ? e_model::MODEL_3B : e_model::MODEL_13B; break;
54055405
case 48: model.type = e_model::MODEL_34B; break;
54065406
case 60: model.type = e_model::MODEL_30B; break;
54075407
case 80: model.type = hparams.n_head() == hparams.n_head_kv() ? e_model::MODEL_65B : e_model::MODEL_70B; break;

0 commit comments

Comments
 (0)