Skip to content

Commit aba30d6

Browse files
committed
fix: Fix the chunk size computation
Branch: Mamba2SSD Signed-off-by: Gabe Goodhart <[email protected]>
1 parent 0441ccb commit aba30d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/llama-model.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11906,7 +11906,7 @@ struct llm_graph_context_mamba : public llm_graph_context {
1190611906
for (auto chunk_i = 0; chunk_i < n_seq_tokens; chunk_i += chunk_size) {
1190711907

1190811908
// chunk views
11909-
const auto chunk_size_i = std::min(chunk_size, uint32_t(n_seq_tokens - chunk_i * chunk_size));
11909+
const auto chunk_size_i = std::min(chunk_size, uint32_t(n_seq_tokens - chunk_i));
1191011910
// slice dtA on dim 1
1191111911
ggml_tensor * dtA_chunk = ggml_view_3d(ctx, dtA,
1191211912
dtA->ne[0], chunk_size_i, dtA->ne[2],

0 commit comments

Comments
 (0)