Commit 426090367 for llama.cpp
commit 4260903678a7525f43419dc234a942b551a8951e
Author: Andrei <abetlen@gmail.com>
Date: Sun Sep 20 00:58:14 2026 -0400
fix(mamba) : make time-step projection input contiguous (#28832)
* mamba : make time-step projection input contiguous
Assisted-by: ChatGPT
* mamba : skip contiguous copy after normalization
Assisted-by: ChatGPT
diff --git a/src/models/mamba-base.cpp b/src/models/mamba-base.cpp
index 03ee3805b..370de0f01 100644
--- a/src/models/mamba-base.cpp
+++ b/src/models/mamba-base.cpp
@@ -100,6 +100,8 @@ ggml_tensor * llm_build_mamba_base::build_mamba_layer(llm_graph_input_rs * inp,
dt = build_norm(dt, layer.ssm_dt_norm, NULL, LLM_NORM_RMS, il);
B = build_norm(B, layer.ssm_b_norm, NULL, LLM_NORM_RMS, il);
C = build_norm(C, layer.ssm_c_norm, NULL, LLM_NORM_RMS, il);
+ } else {
+ dt = ggml_cont(ctx0, dt);
}
// {dt_rank, d_inner} @ {dt_rank, n_seq_tokens, n_seqs} => {d_inner, n_seq_tokens, n_seqs}