Skip to content

Commit 833e2b7

Browse files
ggerganovslaren
andauthored
model : print tensor size during load (#12711)
* model : print tensor size during load * cont : fix units MB -> MiB Co-authored-by: Diego Devesa <slarengh@gmail.com> --------- Co-authored-by: Diego Devesa <slarengh@gmail.com>
1 parent e0e912f commit 833e2b7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/llama-model-loader.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,9 @@ llama_model_loader::llama_model_loader(
603603

604604
if (trace > 0) {
605605
const uint16_t sid = w.idx;
606-
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());
606+
LLAMA_LOG_INFO("%s: - tensor split %2d: %32s %-8s [ %s ] %8.2f MiB\n", __func__,
607+
sid, ggml_get_name(tensor), ggml_type_name(type), llama_format_tensor_shape(tensor).c_str(),
608+
ggml_nbytes(tensor)/1024.0f/1024.0f);
607609
}
608610
}
609611

0 commit comments

Comments
 (0)