Skip to content

Commit 9ef6b0b

Browse files
authored
model : add gpt-oss type strings (ggml-org#15424)
1 parent 1e19f5d commit 9ef6b0b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/llama-model.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ const char * llm_type_name(llm_type type) {
8686
case LLM_TYPE_40B: return "40B";
8787
case LLM_TYPE_65B: return "65B";
8888
case LLM_TYPE_70B: return "70B";
89+
case LLM_TYPE_120B: return "120B";
8990
case LLM_TYPE_142B: return "142B";
9091
case LLM_TYPE_236B: return "236B";
9192
case LLM_TYPE_290B: return "290B";
@@ -1834,7 +1835,11 @@ void llama_model::load_hparams(llama_model_loader & ml) {
18341835
hparams.swa_type = LLAMA_SWA_TYPE_STANDARD;
18351836
hparams.set_swa_pattern(2);
18361837

1837-
// TODO: switch (hparams.n_layer)
1838+
switch (hparams.n_layer) {
1839+
case 24: type = LLM_TYPE_20B; break;
1840+
case 36: type = LLM_TYPE_120B; break;
1841+
default: type = LLM_TYPE_UNKNOWN;
1842+
}
18381843
} break;
18391844
case LLM_ARCH_LFM2:
18401845
{

src/llama-model.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ enum llm_type {
7979
LLM_TYPE_40B,
8080
LLM_TYPE_65B,
8181
LLM_TYPE_70B,
82+
LLM_TYPE_120B,
8283
LLM_TYPE_142B,
8384
LLM_TYPE_236B,
8485
LLM_TYPE_290B,

0 commit comments

Comments
 (0)