Skip to content

Commit 29a94ae

Browse files
MollySophiaNeoZhangJianyu
authored andcommitted
llama: fix missing k_cache store for rwkv6qwen2 (ggml-org#11445)
Signed-off-by: Molly Sophia <[email protected]>
1 parent f9326b9 commit 29a94ae

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/llama.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7704,17 +7704,13 @@ struct llm_build_context {
77047704
1
77057705
);
77067706

7707+
struct ggml_tensor * last_norm_att = ggml_view_3d(ctx0, x_norm_att, n_embd, 1, n_seqs, x_norm_att->nb[1], x_norm_att->nb[2], (n_seq_tokens-1)*n_embd*ggml_element_size(x_norm_att));
77077708
ggml_build_forward_expand(
77087709
gf,
77097710
ggml_cpy(
77107711
ctx0,
7711-
wkv_states,
7712-
ggml_view_1d(
7713-
ctx0,
7714-
kv_self.v_l[il],
7715-
hparams.n_embd_v_s() * n_seqs,
7716-
hparams.n_embd_v_s() * kv_head * ggml_element_size(kv_self.v_l[il])
7717-
)
7712+
ggml_view_1d(ctx0, last_norm_att, n_embd * n_seqs, 0),
7713+
ggml_view_1d(ctx0, kv_self.k_l[il], hparams.n_embd_k_s() * n_seqs, hparams.n_embd_k_s() * kv_head * ggml_element_size(kv_self.k_l[il]))
77187714
)
77197715
);
77207716

0 commit comments

Comments
 (0)