Skip to content

Commit 6b2feaf

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 e053aad commit 6b2feaf

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
@@ -13250,10 +13250,6 @@ struct llm_build_hybrid_mamba : public llm_graph_context {
1325013250
inp_pos = build_inp_pos();
1325113251
}
1325213252

13253-
// Extract the recurrent cache from the hybrid parent
13254-
const auto * kv_recurrent = static_cast<const llama_kv_cache_hybrid_recurrent *>(memory)->get_kv_recurrent();
13255-
GGML_ASSERT(kv_recurrent);
13256-
1325713253
for (int il = 0; il < n_layer; ++il) {
1325813254
struct ggml_tensor * inpSA = inpL;
1325913255

@@ -13266,9 +13262,9 @@ struct llm_build_hybrid_mamba : public llm_graph_context {
1326613262
if (hparams.recurrent_layer(il)) {
1326713263
// ssm layer //
1326813264
if (use_mamba2) {
13269-
cur = llm_build_mamba::build_mamba2_layer(this, gf, cur, state_copy, kv_recurrent, model, ubatch, il);
13265+
cur = llm_build_mamba::build_mamba2_layer(this, gf, cur, state_copy, model, ubatch, il);
1327013266
} else {
13271-
cur = llm_build_mamba::build_mamba_layer(this, gf, cur, state_copy, kv_recurrent, model, ubatch, il);
13267+
cur = llm_build_mamba::build_mamba_layer(this, gf, cur, state_copy, model, ubatch, il);
1327213268
}
1327313269
} else {
1327413270
// attention layer //

0 commit comments

Comments
 (0)