Skip to content

Commit d45f20d

Browse files
mitmulshaobo.xie
authored andcommitted
llama : fix parallel processing for plamo2 (#14716)
1 parent 4d3390c commit d45f20d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/llama-model.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15806,6 +15806,7 @@ struct llm_build_plamo2 : public llm_graph_context_mamba {
1580615806
cb(zx, "mamba_in_proj", il);
1580715807
// {8192, 5, 1, 1} -> {8192, 1, 5, 1}
1580815808
zx = ggml_permute(ctx0, zx, 0, 2, 1, 3);
15809+
zx = ggml_cont(ctx0, zx);
1580915810
zx = ggml_reshape_4d(ctx0, zx, head_dim * 2, n_heads, n_seq_tokens, n_seqs);
1581015811
cb(zx, "mamba_in_proj_out", il);
1581115812

@@ -15823,7 +15824,6 @@ struct llm_build_plamo2 : public llm_graph_context_mamba {
1582315824
// conv1d
1582415825
{
1582515826
// => {d_conv - 1 + n_seq_tokens, d_inner, n_seqs}
15826-
x = ggml_view_2d(ctx0, x, d_inner, n_seq_tokens * n_seqs, d_inner * x->nb[0], 0);
1582715827
ggml_tensor * conv_x = ggml_concat(ctx0, conv, ggml_transpose(ctx0, x), 0);
1582815828
cb(conv_x, "mamba_conv1d_input", il);
1582915829

0 commit comments

Comments
 (0)