Skip to content

Commit

Permalink
Partial Fix for Sliding Window Attention (#994)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdoko authored Dec 19, 2024
1 parent 0b4532c commit c582196
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions mistralrs-core/src/pipeline/cache_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,6 @@ impl KvCache {
if let Some(mut mask) = mask.cloned() {
let mask_len = mask.dim(1)?;
mask = mask.narrow(1, mask_len - (sliding_window - 1), sliding_window - 1)?;
mask = Tensor::cat(
&[&mask, &mask.narrow(1, mask_len - 1, 1)?.ones_like()?],
D::Minus1,
)?;
return Ok((k, v, Some(mask)));
}
}
Expand Down

0 comments on commit c582196

Please sign in to comment.