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 Aug 30, 2024
1 parent 7ea8d80 commit 1082138
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3687,10 +3687,8 @@ static bool llama_kv_cache_seq_rm(
const llama_kv_cell & cell = cache.cells[tail_id];
// partial intersection is invalid
if ((0 < p0 && p0 <= cell.pos) || (0 < p1 && p1 <= cell.pos)) {
return false;
}
if (p0 <= cell.pos && p1 < cell.pos) {
tail_id = -1;
return false;
}
}
} else {
Expand Down

0 comments on commit 1082138

Please sign in to comment.