Skip to content

Commit

Permalink
src: make tail invalid when kv cell is intersection for mamba
Browse files Browse the repository at this point in the history
  • Loading branch information
kylo5aby committed Sep 2, 2024
1 parent 7ea8d80 commit 4e8f9a0
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
Expand Up @@ -3689,7 +3689,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;
}
}
Expand Down

0 comments on commit 4e8f9a0

Please sign in to comment.