src: make tail invalid when kv cell is intersection for mamba

This commit is contained in:
zhenweijin 2024-08-30 15:59:25 +08:00
parent 7ea8d80d53
commit 4e8f9a04b5

View file

@ -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;
}
}