Skip to content

Commit 85bce3a

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 17e51e7 commit 85bce3a

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

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

@@ -12993,9 +12989,9 @@ struct llm_build_hybrid_mamba : public llm_graph_context {
1299312989
if (hparams.recurrent_layer(il)) {
1299412990
// ssm layer //
1299512991
if (use_mamba2) {
12996-
cur = llm_build_mamba::build_mamba2_layer(this, gf, cur, state_copy, kv_recurrent, model, ubatch, il);
12992+
cur = llm_build_mamba::build_mamba2_layer(this, gf, cur, state_copy, model, ubatch, il);
1299712993
} else {
12998-
cur = llm_build_mamba::build_mamba_layer(this, gf, cur, state_copy, kv_recurrent, model, ubatch, il);
12994+
cur = llm_build_mamba::build_mamba_layer(this, gf, cur, state_copy, model, ubatch, il);
1299912995
}
1300012996
} else {
1300112997
// attention layer //

0 commit comments

Comments
 (0)