Skip to content

Commit 329ff61

Browse files
authored
llama : recognize 1B phi models (#4847)
This update categorizes models with 24 layers as MODEL_1B, ensuring compatibility with different Phi model variants without impacting existing Phi-2 model functionality.
1 parent d34633d commit 329ff61

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llama.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2829,6 +2829,7 @@ static void llm_load_hparams(
28292829
ml.get_key(LLM_KV_ATTENTION_LAYERNORM_EPS, hparams.f_norm_eps);
28302830

28312831
switch (hparams.n_layer) {
2832+
case 24: model.type = e_model::MODEL_1B; break;
28322833
case 32: model.type = e_model::MODEL_3B; break;
28332834
default: model.type = e_model::MODEL_UNKNOWN;
28342835
}

0 commit comments

Comments
 (0)