]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
llama : fix compile warning (#8304)
authorGeorgi Gerganov <redacted>
Fri, 5 Jul 2024 14:32:09 +0000 (17:32 +0300)
committerGeorgi Gerganov <redacted>
Fri, 5 Jul 2024 14:32:09 +0000 (17:32 +0300)
src/llama.cpp

index 95184c1083a1c6d5a891a4289ccf090ff41604de..18956d441409fb47ccb6df5f950eb28488b9e787 100644 (file)
@@ -7261,7 +7261,7 @@ static bool llm_load_tensors(
 
                         layer.ffn_norm = ml.create_tensor(ctx_layer, tn(LLM_TENSOR_FFN_NORM, "weight", i), {n_embd});
 
-                        if (i < hparams.n_layer_dense_lead) {
+                        if (i < (int) hparams.n_layer_dense_lead) {
                             layer.ffn_gate = ml.create_tensor(ctx_split, tn(LLM_TENSOR_FFN_GATE, "weight", i), {n_embd,   n_ff});
                             layer.ffn_down = ml.create_tensor(ctx_split, tn(LLM_TENSOR_FFN_DOWN, "weight", i), {  n_ff, n_embd});
                             layer.ffn_up   = ml.create_tensor(ctx_split, tn(LLM_TENSOR_FFN_UP,   "weight", i), {n_embd,   n_ff});