Skip to content

Commit 2b20a09

Browse files
committed
fix: Fix hybrid granite implementation for signature changes in build_mamba*_layer
Branch: GraniteFour Signed-off-by: Gabe Goodhart <[email protected]>
1 parent 8e2221f commit 2b20a09

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/llama-model.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12969,10 +12969,6 @@ struct llm_build_hybrid_mamba : public llm_graph_context {
1296912969
inp_pos = build_inp_pos();
1297012970
}
1297112971

12972-
// Extract the recurrent cache from the hybrid parent
12973-
const auto * kv_recurrent = static_cast<const llama_kv_cache_hybrid_recurrent *>(memory)->get_kv_recurrent();
12974-
GGML_ASSERT(kv_recurrent);
12975-
1297612972
for (int il = 0; il < n_layer; ++il) {
1297712973
struct ggml_tensor * inpSA = inpL;
1297812974

@@ -12985,9 +12981,9 @@ struct llm_build_hybrid_mamba : public llm_graph_context {
1298512981
if (hparams.recurrent_layer(il)) {
1298612982
// ssm layer //
1298712983
if (use_mamba2) {
12988-
cur = llm_build_mamba::build_mamba2_layer(this, gf, cur, state_copy, kv_recurrent, model, ubatch, il);
12984+
cur = llm_build_mamba::build_mamba2_layer(this, gf, cur, state_copy, model, ubatch, il);
1298912985
} else {
12990-
cur = llm_build_mamba::build_mamba_layer(this, gf, cur, state_copy, kv_recurrent, model, ubatch, il);
12986+
cur = llm_build_mamba::build_mamba_layer(this, gf, cur, state_copy, model, ubatch, il);
1299112987
}
1299212988
} else {
1299312989
// attention layer //

0 commit comments

Comments
 (0)