]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
llama : recognize 1B phi models (#4847)
authorAustin <redacted>
Wed, 10 Jan 2024 13:39:09 +0000 (08:39 -0500)
committerGitHub <redacted>
Wed, 10 Jan 2024 13:39:09 +0000 (15:39 +0200)
This update categorizes models with 24 layers as MODEL_1B, ensuring compatibility with different Phi model variants without impacting existing Phi-2 model functionality.

llama.cpp

index 8e0717db92702ce6808c44ebe38a1f1c4294c5c8..0f09d0c2bebf541392d63eb02b824172f9a3c4f8 100644 (file)
--- a/llama.cpp
+++ b/llama.cpp
@@ -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;
                 }