From: Diego Devesa Date: Sun, 24 Nov 2024 15:10:26 +0000 (+0100) Subject: llama : fix op mul check with command-r-plus (#10476) X-Git-Tag: upstream/0.0.4488~330 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=dc39012cbaf8752fabecaeb60af78ccdd1dfb73b;p=pkg%2Fggml%2Fsources%2Fllama.cpp llama : fix op mul check with command-r-plus (#10476) --- diff --git a/src/llama.cpp b/src/llama.cpp index 00171103..20df09b1 100644 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -7181,12 +7181,12 @@ static bool weight_buft_supported(const llama_hparams & hparams, ggml_tensor * w } break; case GGML_OP_ADD: { - ggml_tensor * a = ggml_new_tensor_2d(ctx, GGML_TYPE_F32, w->ne[0], 512); + ggml_tensor * a = ggml_new_tensor_4d(ctx, GGML_TYPE_F32, w->ne[0], w->ne[1], w->ne[2], w->ne[3]); op_tensor = ggml_add(ctx, a, w); } break; case GGML_OP_MUL: { - ggml_tensor * a = ggml_new_tensor_2d(ctx, GGML_TYPE_F32, w->ne[0], 512); + ggml_tensor * a = ggml_new_tensor_4d(ctx, GGML_TYPE_F32, w->ne[0], w->ne[1], w->ne[2], w->ne[3]); op_tensor = ggml_mul(ctx, a, w); } break; case GGML_OP_DIV: