Skip to content

Commit

Permalink
src: make tail invalid when kv cell is intersection for mamba (ggerga…
Browse files Browse the repository at this point in the history
  • Loading branch information
kylo5aby authored and arthw committed Nov 18, 2024
1 parent de898a7 commit 8565241
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/llama.cpp
Original file line number Diff line number Diff line change
@@ -3810,7 +3810,8 @@ static bool llama_kv_cache_seq_rm(
if ((0 < p0 && p0 <= cell.pos) || (0 < p1 && p1 <= cell.pos)) {
return false;
}
if (p0 <= cell.pos && p1 < cell.pos) {
// invalidate tails which will be cleared
if (p0 <= cell.pos && cell.pos < p1) {
tail_id = -1;
}
}

0 comments on commit 8565241

Please sign in to comment.