Skip to content

Commit eaea325

Browse files
authored
clip : fix model size display (#13153)
1 parent 43ddab6 commit eaea325

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/llava/clip.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1574,7 +1574,7 @@ struct clip_model_loader {
15741574
clip_ctx & ctx_clip;
15751575
std::string fname;
15761576

1577-
size_t model_size; // in bytes
1577+
size_t model_size = 0; // in bytes
15781578

15791579
// TODO @ngxson : we should not pass clip_ctx here, it should be clip_vision_model
15801580
clip_model_loader(const char * fname, clip_ctx & ctx_clip) : ctx_clip(ctx_clip), fname(fname) {
@@ -1748,6 +1748,8 @@ struct clip_model_loader {
17481748
LOG_INF("%s: minicpmv_version: %d\n", __func__, ctx_clip.minicpmv_version);
17491749
LOG_INF("%s: proj_scale_factor: %d\n", __func__, hparams.proj_scale_factor);
17501750
LOG_INF("%s: n_wa_pattern: %d\n", __func__, hparams.n_wa_pattern);
1751+
LOG_INF("%s: use_silu: %d\n", __func__, ctx_clip.use_silu);
1752+
LOG_INF("%s: use_gelu: %d\n", __func__, ctx_clip.use_gelu);
17511753
LOG_INF("%s: model size: %.2f MiB\n", __func__, model_size / 1024.0 / 1024.0);
17521754
LOG_INF("%s: metadata size: %.2f MiB\n", __func__, ggml_get_mem_size(ctx_meta.get()) / 1024.0 / 1024.0);
17531755
}

0 commit comments

Comments
 (0)