Skip to content

Commit 82caa72

Browse files
victor-villarCISC
authored andcommitted
model : fix Granite Hybrid type check for 7B.A1B (ggml-org#20795)
* Check granite hybriid expert count to set type as LLM_TYPE_7B_A1B or LLM_TYPE_1B * Use feed fwd dim instead of num of experts Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@scala.com> --------- Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@scala.com>
1 parent 3b7f7f0 commit 82caa72

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/llama-model.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2058,7 +2058,7 @@ void llama_model::load_hparams(llama_model_loader & ml) {
20582058

20592059
switch (hparams.n_embd) {
20602060
case 768: type = LLM_TYPE_350M; break;
2061-
case 1536: type = (hparams.n_embd == 2048 ? LLM_TYPE_7B_A1B : LLM_TYPE_1B); break;
2061+
case 1536: type = (hparams.n_ff() == 512 ? LLM_TYPE_7B_A1B : LLM_TYPE_1B); break;
20622062
case 2048: case 2560: type = LLM_TYPE_3B; break;
20632063
case 4096: type = LLM_TYPE_32B; break;
20642064
default: type = LLM_TYPE_UNKNOWN;

0 commit comments

Comments
 (0)