File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1325,8 +1325,10 @@ static llama_state g_state;
1325
1325
// available llama models
1326
1326
enum e_model {
1327
1327
MODEL_UNKNOWN,
1328
+ MODEL_0_5B,
1328
1329
MODEL_1B,
1329
1330
MODEL_3B,
1331
+ MODEL_4B,
1330
1332
MODEL_7B,
1331
1333
MODEL_8B,
1332
1334
MODEL_13B,
@@ -2892,9 +2894,9 @@ static void llm_load_hparams(
2892
2894
{
2893
2895
ml.get_key (LLM_KV_ATTENTION_LAYERNORM_RMS_EPS, hparams.f_norm_rms_eps );
2894
2896
switch (hparams.n_layer ) {
2895
- case 24 : model.type = e_model::MODEL_1B; break ;
2897
+ case 24 : model.type = hparams. n_embd == 1024 ? e_model::MODEL_0_5B : e_model::MODEL_1B; break ;
2896
2898
case 32 : model.type = e_model::MODEL_7B; break ;
2897
- case 40 : model.type = e_model::MODEL_13B; break ;
2899
+ case 40 : model.type = hparams. n_head == 20 ? e_model::MODEL_4B : e_model::MODEL_13B; break ;
2898
2900
case 80 : model.type = e_model::MODEL_70B; break ;
2899
2901
default : model.type = e_model::MODEL_UNKNOWN;
2900
2902
}
You can’t perform that action at this time.
0 commit comments