Skip to content

Commit 857fa82

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 9e45fac commit 857fa82

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
@@ -12975,10 +12975,6 @@ struct llm_build_hybrid_mamba : public llm_graph_context {
1297512975
inp_pos = build_inp_pos();
1297612976
}
1297712977

12978-
// Extract the recurrent cache from the hybrid parent
12979-
const auto * kv_recurrent = static_cast<const llama_kv_cache_hybrid_recurrent *>(memory)->get_kv_recurrent();
12980-
GGML_ASSERT(kv_recurrent);
12981-
1298212978
for (int il = 0; il < n_layer; ++il) {
1298312979
struct ggml_tensor * inpSA = inpL;
1298412980

@@ -12991,9 +12987,9 @@ struct llm_build_hybrid_mamba : public llm_graph_context {
1299112987
if (hparams.recurrent_layer(il)) {
1299212988
// ssm layer //
1299312989
if (use_mamba2) {
12994-
cur = llm_build_mamba::build_mamba2_layer(this, gf, cur, state_copy, kv_recurrent, model, ubatch, il);
12990+
cur = llm_build_mamba::build_mamba2_layer(this, gf, cur, state_copy, model, ubatch, il);
1299512991
} else {
12996-
cur = llm_build_mamba::build_mamba_layer(this, gf, cur, state_copy, kv_recurrent, model, ubatch, il);
12992+
cur = llm_build_mamba::build_mamba_layer(this, gf, cur, state_copy, model, ubatch, il);
1299712993
}
1299812994
} else {
1299912995
// attention layer //

0 commit comments

Comments
 (0)