File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -2173,6 +2173,7 @@ enum e_model {
2173
2173
MODEL_1B,
2174
2174
MODEL_1_3B,
2175
2175
MODEL_1_4B,
2176
+ MODEL_1_6B,
2176
2177
MODEL_2B,
2177
2178
MODEL_2_8B,
2178
2179
MODEL_3B,
@@ -5353,6 +5354,18 @@ static void llm_load_hparams(
5353
5354
ml.get_key(LLM_KV_ATTENTION_LAYERNORM_EPS, hparams.f_norm_eps);
5354
5355
ml.get_key(LLM_KV_WKV_HEAD_SIZE, hparams.wkv_head_size);
5355
5356
ml.get_key(LLM_KV_RESCALE_EVERY_N_LAYERS, hparams.rescale_every_n_layers, false);
5357
+
5358
+ switch (hparams.n_layer) {
5359
+ case 24: model.type = e_model::MODEL_1_6B; break;
5360
+ case 32:
5361
+ switch (hparams.n_embd) {
5362
+ case 2560: model.type = e_model::MODEL_3B; break;
5363
+ case 4096: model.type = e_model::MODEL_7B; break;
5364
+ default: model.type = e_model::MODEL_UNKNOWN;
5365
+ } break;
5366
+ case 61: model.type = e_model::MODEL_14B; break;
5367
+ default: model.type = e_model::MODEL_UNKNOWN;
5368
+ }
5356
5369
} break;
5357
5370
default: (void)0;
5358
5371
}
You can’t perform that action at this time.
0 commit comments