Skip to content

Commit 6627422

Browse files
committed
fix
1 parent 17cf6f8 commit 6627422

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/llama.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,11 +588,12 @@ static struct ggml_tensor * llm_build_kqv(
588588
ggml_row_size(kv.v_l[il]->type, n_embd_head_v),
589589
0);
590590
cb(v, "v", il);
591-
591+
592592
struct ggml_tensor * padded_v = v;
593593
int64_t n_embd_head_v_out = n_embd_head_v;
594594
if (n_embd_head_v < n_embd_head_k) {
595-
padded_v = ggml_pad(ctx, v, 0, k->ne[0] - v->ne[1], 0, 0);
595+
// Pad the feature dimension (assuming it's the third dimension, adjust indices as per actual tensor layout)
596+
padded_v = ggml_pad(ctx, v, 0, 0, k->ne[2] - v->ne[2], 0); // Correct dimension for feature padding
596597
cb(padded_v, "padded_v", il);
597598
n_embd_head_v_out = n_embd_head_k;
598599
}

0 commit comments

Comments
 (0)