File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ const char * llm_type_name(llm_type type) {
114114 case LLM_TYPE_17B_16E: return "17Bx16E (Scout)";
115115 case LLM_TYPE_17B_128E: return "17Bx128E (Maverick)";
116116 case LLM_TYPE_A13B: return "A13B";
117+ case LLM_TYPE_7B_A1B: return "7B.A1B";
117118 case LLM_TYPE_8B_A1B: return "8B.A1B";
118119 case LLM_TYPE_21B_A3B: return "21B.A3B";
119120 case LLM_TYPE_30B_A3B: return "30B.A3B";
@@ -1843,8 +1844,10 @@ void llama_model::load_hparams(llama_model_loader & ml) {
18431844
18441845 ml.get_key(LLM_KV_ATTENTION_LAYERNORM_RMS_EPS, hparams.f_norm_rms_eps);
18451846
1846- switch (hparams.n_layer) {
1847- // TODO: Add llm type label (not sure this is useful)
1847+ switch (hparams.n_embd) {
1848+ case 1536: type = LLM_TYPE_7B_A1B; break;
1849+ case 2048: case 2560: type = LLM_TYPE_3B; break;
1850+ case 4096: type = LLM_TYPE_32B; break;
18481851 default: type = LLM_TYPE_UNKNOWN;
18491852 }
18501853
Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ enum llm_type {
107107 LLM_TYPE_17B_16E, // llama4 Scout
108108 LLM_TYPE_17B_128E, // llama4 Maverick
109109 LLM_TYPE_A13B,
110+ LLM_TYPE_7B_A1B,
110111 LLM_TYPE_8B_A1B, // lfm2moe
111112 LLM_TYPE_21B_A3B, // Ernie MoE small
112113 LLM_TYPE_30B_A3B,
You can’t perform that action at this time.
0 commit comments