Skip to content

Commit 08493bf

Browse files
committed
fix: Fix hybrid granite implementation for signature changes in build_mamba*_layer
Branch: GraniteFour Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
1 parent 3c22e1d commit 08493bf

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
@@ -13262,10 +13262,6 @@ struct llm_build_hybrid_mamba : public llm_graph_context {
1326213262
inp_pos = build_inp_pos();
1326313263
}
1326413264

13265-
// Extract the recurrent cache from the hybrid parent
13266-
const auto * kv_recurrent = static_cast<const llama_kv_cache_hybrid_recurrent *>(memory)->get_kv_recurrent();
13267-
GGML_ASSERT(kv_recurrent);
13268-
1326913265
for (int il = 0; il < n_layer; ++il) {
1327013266
struct ggml_tensor * inpSA = inpL;
1327113267

@@ -13278,9 +13274,9 @@ struct llm_build_hybrid_mamba : public llm_graph_context {
1327813274
if (hparams.recurrent_layer(il)) {
1327913275
// ssm layer //
1328013276
if (use_mamba2) {
13281-
cur = llm_build_mamba::build_mamba2_layer(this, gf, cur, state_copy, kv_recurrent, model, ubatch, il);
13277+
cur = llm_build_mamba::build_mamba2_layer(this, gf, cur, state_copy, model, ubatch, il);
1328213278
} else {
13283-
cur = llm_build_mamba::build_mamba_layer(this, gf, cur, state_copy, kv_recurrent, model, ubatch, il);
13279+
cur = llm_build_mamba::build_mamba_layer(this, gf, cur, state_copy, model, ubatch, il);
1328413280
}
1328513281
} else {
1328613282
// attention layer //

0 commit comments

Comments
 (0)