ggml : change ggml_scale to take a float instead of tensor

This commit is contained in:
Georgi Gerganov 2023-12-21 20:50:24 +02:00
parent 8fe03ffdda
commit 199f6bdc46
No known key found for this signature in database
GPG key ID: 449E073F9DC10735
10 changed files with 68 additions and 186 deletions

View file

@ -309,7 +309,7 @@ static struct ggml_cgraph * build_graph_lora(
) {
struct ggml_tensor * ab = ggml_mul_mat(ctx, lora_a, lora_b);
if (scaling != 1.0f) {
ab = ggml_scale(ctx, ab, ggml_new_f32(ctx, scaling));
ab = ggml_scale(ctx, ab, scaling);
}
struct ggml_tensor * res = ggml_add_inplace(ctx, tensor, ab);