model: fix all granite family parameter counts (#28643)

* model: fix all granite family parameter counts

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

* model: fix additional include, add missing `A` prefix for active experts

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

* model: fix code alignment, rm unused 40 block case

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

---------

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>
This commit is contained in:
Aaron Teo authored and GitHub committed 2026-09-10 09:49:56 +03:00
1 parent 434ddbbc0e
commit d7e86430a7
5 files changed
+16 -4

No files matched your search

+10 -1
View File
@@ -38,7 +38,16 @@ void llama_model_granite::load_arch_hparams(llama_model_loader & ml) {
switch (hparams.n_layer()) {
case 32: type = LLM_TYPE_3B; break;
case 40: type = LLM_TYPE_3B; break;
case 40: {
switch (hparams.n_embd) {
case 2048: type = LLM_TYPE_2B; break;
case 2560: type = LLM_TYPE_3B; break;
case 4096: type = LLM_TYPE_8B; break;
default: type = LLM_TYPE_UNKNOWN;
}
break;
}
case 64: type = LLM_TYPE_30B; break;
// Add additional layer/vocab/etc checks here for other model sizes
default: type = LLM_TYPE_UNKNOWN;
}