From 33425a7e1ed366082a2dbf64f2485531471515e0 Mon Sep 17 00:00:00 2001 From: Francis Couture-Harpin Date: Wed, 12 Jun 2024 12:57:02 -0400 Subject: [PATCH] mamba : fix non-contiguous usage of ggml_silu --- llama.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama.cpp b/llama.cpp index 2233161d8..37190bf1c 100644 --- a/llama.cpp +++ b/llama.cpp @@ -8867,7 +8867,7 @@ static struct ggml_tensor * llm_build_mamba( // {d_inner, n_seq_tokens, n_seqs} * {d_inner} => {d_inner, n_seq_tokens, n_seqs} y = ggml_add(ctx, y, ggml_mul(ctx, x, model.layers[il].ssm_d)); - y = ggml_mul(ctx, y, ggml_silu(ctx, z)); + y = ggml_mul(ctx, y, ggml_silu(ctx, ggml_cont(ctx, z))); // {d_inner, n_embd} @ {d_inner, n_seq_tokens, n_seqs} => {n_embd, n_seq_tokens, n_seqs} cur = ggml_mul_mat(ctx, model.layers[il].ssm_out, y);