phi-2 : use layer norm eps

This commit is contained in:
Georgi Gerganov 2023-12-16 10:54:10 +02:00
parent a2a3d2c8d7
commit aa5c881adb
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735

View File

@ -2646,6 +2646,15 @@ static void llm_load_hparams(
default: model.type = e_model::MODEL_UNKNOWN;
}
} break;
case LLM_ARCH_PHI2:
{
ml.get_key(LLM_KV_ATTENTION_LAYERNORM_EPS, hparams.f_norm_eps);
switch (hparams.n_layer) {
case 32: model.type = e_model::MODEL_3B; break;
default: model.type = e_model::MODEL_UNKNOWN;
}
} break;
default: (void)0;
}