]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
llama : llama_model_desc print number of experts
authorGeorgi Gerganov <redacted>
Tue, 2 Jan 2024 14:26:45 +0000 (16:26 +0200)
committerGeorgi Gerganov <redacted>
Tue, 2 Jan 2024 14:26:45 +0000 (16:26 +0200)
llama.cpp

index 2e34cb395ed2204d634221cfebdaf2463f4a2ae9..3bb056dba2e6d6ab21fcd21a3ab70776ad01557d 100644 (file)
--- a/llama.cpp
+++ b/llama.cpp
@@ -9965,8 +9965,9 @@ int32_t llama_model_meta_val_str_by_index(const struct llama_model * model, int3
 }
 
 int32_t llama_model_desc(const struct llama_model * model, char * buf, size_t buf_size) {
-    return snprintf(buf, buf_size, "%s %s %s",
+    return snprintf(buf, buf_size, "%s %s%s %s",
             llama_model_arch_name(model->arch).c_str(),
+            model->hparams.n_expert > 0 ? (std::to_string(model->hparams.n_expert) + "x").c_str() : "",
             llama_model_type_name(model->type),
             llama_model_ftype_name(model->ftype).c_str());
 }