Skip to content

Commit e73d795

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 ec13f29 commit e73d795

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
@@ -5455,7 +5455,7 @@ static void llm_load_hparams(
54555455
// granite uses a vocab with len 49152
54565456
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;
54575457
case 36: model.type = e_model::MODEL_8B; break; // granite
5458-
case 40: model.type = hparams.n_vocab == 49152 ? e_model::MODEL_3B : e_model::MODEL_13B; break;
5458+
case 40: model.type = (hparams.n_vocab == 49152 || hparams.n_vocab == 49156) ? e_model::MODEL_3B : e_model::MODEL_13B; break;
54595459
case 48: model.type = e_model::MODEL_34B; break;
54605460
case 60: model.type = e_model::MODEL_30B; break;
54615461
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)