Skip to content

Commit 0525166

Browse files
authored
Also need to permute q_pe
1 parent 66c374c commit 0525166

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/llama-model.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "llama-model.h"
1+
dee#include "llama-model.h"
22

33
#include "llama-impl.h"
44
#include "llama-mmap.h"
@@ -10143,6 +10143,10 @@ struct llm_build_deepseek2 : public llm_graph_context {
1014310143
cb(kv_cmpr, "kv_cmpr", il);
1014410144

1014510145
if (is_mla) {
10146+
// {n_embd_head_qk_rope, n_tokens, n_head}
10147+
q_pe = ggml_permute(ctx0, q_pe, 0, 2, 1, 3);
10148+
cb(q_pe, "q_pe_perm", il);
10149+
1014610150
// {n_embd_head_qk_nope, n_tokens, n_head}
1014710151
q_nope = ggml_permute(ctx0, q_nope, 0, 2, 1, 3);
1014810152
cb(q_nope, "q_nope_perm", il);

0 commit comments

Comments
 (0)