llama : style fixes
This commit is contained in:
parent
3839704062
commit
663d952abb
1 changed files with 20 additions and 19 deletions
|
@ -1022,7 +1022,8 @@ struct llama_model_loader {
|
||||||
int n_kv = 0;
|
int n_kv = 0;
|
||||||
int n_tensors = 0;
|
int n_tensors = 0;
|
||||||
int n_created = 0;
|
int n_created = 0;
|
||||||
size_t n_tot_elements = 0;
|
|
||||||
|
int64_t n_elements = 0;
|
||||||
|
|
||||||
bool use_mmap = false;
|
bool use_mmap = false;
|
||||||
|
|
||||||
|
@ -1050,7 +1051,7 @@ struct llama_model_loader {
|
||||||
for (int i = 0; i < n_tensors; i++) {
|
for (int i = 0; i < n_tensors; i++) {
|
||||||
const char * name = gguf_get_tensor_name(ctx_gguf, i);
|
const char * name = gguf_get_tensor_name(ctx_gguf, i);
|
||||||
struct ggml_tensor * t = ggml_get_tensor(ctx_meta, name);
|
struct ggml_tensor * t = ggml_get_tensor(ctx_meta, name);
|
||||||
n_tot_elements += ggml_nelements(t);
|
n_elements += ggml_nelements(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
// print meta data
|
// print meta data
|
||||||
|
@ -1424,7 +1425,7 @@ static void llama_model_load_internal(
|
||||||
LLAMA_LOG_INFO("%s: freq_base = %.1f\n", __func__, hparams.rope_freq_base);
|
LLAMA_LOG_INFO("%s: freq_base = %.1f\n", __func__, hparams.rope_freq_base);
|
||||||
LLAMA_LOG_INFO("%s: freq_scale = %g\n", __func__, hparams.rope_freq_scale);
|
LLAMA_LOG_INFO("%s: freq_scale = %g\n", __func__, hparams.rope_freq_scale);
|
||||||
LLAMA_LOG_INFO("%s: model type = %s\n", __func__, llama_model_type_name(model.type));
|
LLAMA_LOG_INFO("%s: model type = %s\n", __func__, llama_model_type_name(model.type));
|
||||||
LLAMA_LOG_INFO("%s: model size = %.2f B\n", __func__, ml->n_tot_elements*1e-9);
|
LLAMA_LOG_INFO("%s: model size = %.2fB\n", __func__, ml->n_elements*1e-9);
|
||||||
|
|
||||||
// TODO: print number of tensors for each quantization
|
// TODO: print number of tensors for each quantization
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue