]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
model : print tensor size during load (#12711)
authorGeorgi Gerganov <redacted>
Wed, 2 Apr 2025 13:38:54 +0000 (16:38 +0300)
committerGitHub <redacted>
Wed, 2 Apr 2025 13:38:54 +0000 (16:38 +0300)
* model : print tensor size during load

* cont : fix units MB -> MiB

Co-authored-by: Diego Devesa <redacted>
---------

Co-authored-by: Diego Devesa <redacted>
src/llama-model-loader.cpp

index ec1d78e3144eb1c78ca790b481018b904cd506d2..ea73a8a7ba944898f1003fe1ed3fc5ecca53a181 100644 (file)
@@ -603,7 +603,9 @@ llama_model_loader::llama_model_loader(
 
             if (trace > 0) {
                 const uint16_t sid = w.idx;
-                LLAMA_LOG_INFO("%s: - tensor split %2d: %32s %-8s [ %s ]\n", __func__, sid, ggml_get_name(tensor), ggml_type_name(type), llama_format_tensor_shape(tensor).c_str());
+                LLAMA_LOG_INFO("%s: - tensor split %2d: %32s %-8s [ %s ] %8.2f MiB\n", __func__,
+                        sid, ggml_get_name(tensor), ggml_type_name(type), llama_format_tensor_shape(tensor).c_str(),
+                        ggml_nbytes(tensor)/1024.0f/1024.0f);
             }
         }