fix warnings

This commit is contained in:
xaedes 2023-08-30 17:12:23 +02:00
parent 0c57f9f0b3
commit 4fd51c4616
No known key found for this signature in database
GPG key ID: 30030EDD817EA2B1
2 changed files with 2 additions and 2 deletions

View file

@ -699,7 +699,7 @@ struct ggml_tensor * llama_build_lora_finetune_graphs(
checkpoints.push_back(t00);
checkpoints.push_back(t01);
struct ggml_tensor * kv_scale;
struct ggml_tensor * kv_scale = NULL;
if (!enable_flash_attn) {
kv_scale = ggml_new_f32(ctx, 1.0f/sqrtf(float(n_embd)/n_head));
}

View file

@ -515,7 +515,7 @@ struct ggml_tensor * llama_build_train_graphs(
checkpoints.push_back(t00);
checkpoints.push_back(t01);
struct ggml_tensor * kv_scale;
struct ggml_tensor * kv_scale = NULL;
if (!enable_flash_attn) {
kv_scale = ggml_new_f32(ctx, 1.0f/sqrtf(float(n_embd)/n_head));
}