Skip to content

Commit

Permalink
src: make tail invalid when kv cell is intersection for mamba (#9249)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylo5aby authored Sep 2, 2024
1 parent 048de84 commit f148516
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 @@ -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;
}
}
Expand Down

0 comments on commit f148516

Please sign in to comment.