Skip to content

Commit

Permalink
Enhanced model type determination in llama.cpp to include Phi-1 and P…
Browse files Browse the repository at this point in the history
…hi-1.5 models.

This update categorizes models with 24 layers as MODEL_1B, ensuring compatibility with different Phi model variants without impacting existing Phi-2 model functionality.
  • Loading branch information
teleprint-me committed Jan 9, 2024
1 parent 6efb8eb commit 6da36b0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2829,6 +2829,7 @@ static void llm_load_hparams(
ml.get_key(LLM_KV_ATTENTION_LAYERNORM_EPS, hparams.f_norm_eps);

switch (hparams.n_layer) {
case 24: model.type = e_model::MODEL_1B; break;
case 32: model.type = e_model::MODEL_3B; break;
default: model.type = e_model::MODEL_UNKNOWN;
}
Expand Down

0 comments on commit 6da36b0

Please sign in to comment.