summaryrefslogtreecommitdiff
path: root/examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp
diff options
context:
space:
mode:
authorHerman Semenov <GermanAizek@yandex.ru>2024-02-18 16:20:12 +0000
committerGitHub <noreply@github.com>2024-02-18 18:20:12 +0200
commit5d3de51f972055702a1859186fe7acb8f0b43dc4 (patch)
tree4d41dc88a8a4aee3e3300874f590c0ec83bf73f5 /examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp
parentfc0c8d286a533363a9a663510b62af85ffad58b3 (diff)
ggml, common, examples, tests : fixed type arguments in printf (#5528)
Diffstat (limited to 'examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp')
-rw-r--r--examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp b/examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp
index 4d41e177..8209dcb6 100644
--- a/examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp
+++ b/examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp
@@ -325,14 +325,14 @@ struct train_params {
};
static void print_params(struct my_llama_hparams * params) {
- printf("%s: n_vocab: %d\n", __func__, params->n_vocab);
- printf("%s: n_ctx: %d\n", __func__, params->n_ctx);
- printf("%s: n_embd: %d\n", __func__, params->n_embd);
- printf("%s: n_mult: %d\n", __func__, params->n_mult);
- printf("%s: n_head: %d\n", __func__, params->n_head);
- printf("%s: n_ff: %d\n", __func__, params->n_ff);
- printf("%s: n_layer: %d\n", __func__, params->n_layer);
- printf("%s: n_rot: %d\n", __func__, params->n_rot);
+ printf("%s: n_vocab: %u\n", __func__, params->n_vocab);
+ printf("%s: n_ctx: %u\n", __func__, params->n_ctx);
+ printf("%s: n_embd: %u\n", __func__, params->n_embd);
+ printf("%s: n_mult: %u\n", __func__, params->n_mult);
+ printf("%s: n_head: %u\n", __func__, params->n_head);
+ printf("%s: n_ff: %u\n", __func__, params->n_ff);
+ printf("%s: n_layer: %u\n", __func__, params->n_layer);
+ printf("%s: n_rot: %u\n", __func__, params->n_rot);
}
static void init_model(struct my_llama_model * model) {
@@ -350,25 +350,25 @@ static void init_model(struct my_llama_model * model) {
model->train_tokens = 0;
model->tok_embeddings = ggml_new_tensor_2d(ctx, GGML_TYPE_F32, n_embd, n_vocab);
- printf("[%s:GG] Allocating [%d] x [%d] = [%d] float space for model->tok_embeddings\n",__func__,n_embd , n_vocab, n_embd * n_vocab);
+ printf("[%s:GG] Allocating [%u] x [%u] = [%u] float space for model->tok_embeddings\n",__func__,n_embd , n_vocab, n_embd * n_vocab);
model->norm = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, n_embd);
- printf("[%s:GG] Allocating [%d] float space for model->norm\n",__func__,n_embd);
+ printf("[%s:GG] Allocating [%u] float space for model->norm\n",__func__,n_embd);
model->output = ggml_new_tensor_2d(ctx, GGML_TYPE_F32, n_embd, n_vocab);
- printf("[%s:GG] Allocating [%d] x[%d] = [%d] float space for model->output\n",__func__,n_embd, n_vocab, n_embd * n_vocab);
+ printf("[%s:GG] Allocating [%u] x[%u] = [%u] float space for model->output\n",__func__,n_embd, n_vocab, n_embd * n_vocab);
// printing the per-layer allocations here so we dont print in the for loop.
- printf("[%s:GG] Allocating [%d] x[%d] = [%d] float space for layer.wq for [%d] layers\n",__func__, n_embd, n_embd, n_embd * n_embd, n_layer);
- printf("[%s:GG] Allocating [%d] x[%d] = [%d] float space for layer.wk for [%d] layers\n",__func__, n_embd, n_embd, n_embd * n_embd, n_layer);
- printf("[%s:GG] Allocating [%d] x[%d] = [%d] float space for layer.wv for [%d] layers\n",__func__, n_embd, n_embd, n_embd * n_embd, n_layer);
- printf("[%s:GG] Allocating [%d] x[%d] = [%d] float space for layer.wo for [%d] layers\n",__func__, n_embd, n_embd, n_embd * n_embd, n_layer);
+ printf("[%s:GG] Allocating [%u] x[%u] = [%u] float space for layer.wq for [%u] layers\n",__func__, n_embd, n_embd, n_embd * n_embd, n_layer);
+ printf("[%s:GG] Allocating [%u] x[%u] = [%u] float space for layer.wk for [%u] layers\n",__func__, n_embd, n_embd, n_embd * n_embd, n_layer);
+ printf("[%s:GG] Allocating [%u] x[%u] = [%u] float space for layer.wv for [%u] layers\n",__func__, n_embd, n_embd, n_embd * n_embd, n_layer);
+ printf("[%s:GG] Allocating [%u] x[%u] = [%u] float space for layer.wo for [%u] layers\n",__func__, n_embd, n_embd, n_embd * n_embd, n_layer);
- printf("[%s:GG] Allocating [%d] float space for layer.ffn_norm for [%d] layers\n",__func__,n_embd, n_layer);
+ printf("[%s:GG] Allocating [%u] float space for layer.ffn_norm for [%u] layers\n",__func__,n_embd, n_layer);
- printf("[%s:GG] Allocating [%d] x[%d] = [%d] float space for layer.w1 for [%d] layers\n",__func__, n_ff, n_embd, n_embd * n_ff, n_layer);
- printf("[%s:GG] Allocating [%d] x[%d] = [%d] float space for layer.w2 for [%d] layers\n",__func__, n_embd, n_ff, n_ff * n_embd, n_layer);
- printf("[%s:GG] Allocating [%d] x[%d] = [%d] float space for layer.w3 for [%d] layers\n",__func__, n_ff, n_embd, n_embd * n_ff, n_layer);
+ printf("[%s:GG] Allocating [%u] x[%u] = [%u] float space for layer.w1 for [%u] layers\n",__func__, n_ff, n_embd, n_embd * n_ff, n_layer);
+ printf("[%s:GG] Allocating [%u] x[%u] = [%u] float space for layer.w2 for [%u] layers\n",__func__, n_embd, n_ff, n_ff * n_embd, n_layer);
+ printf("[%s:GG] Allocating [%u] x[%u] = [%u] float space for layer.w3 for [%u] layers\n",__func__, n_ff, n_embd, n_embd * n_ff, n_layer);
ggml_set_name(model->tok_embeddings, "tok_embeddings.weight");
ggml_set_name(model->norm, "norm.weight");