Skip to content

Commit

Permalink
Fix metal paged attn phi3 (#1033)
Browse files Browse the repository at this point in the history
  • Loading branch information
EricLBuehler authored Jan 7, 2025
1 parent 80beed4 commit a853cdd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions mistralrs-core/src/models/phi3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ impl Attention {
Some(paged_attn) => match metadata {
Some(((key_cache, value_cache), input_metadata)) => paged_attn.forward(
&q,
&k,
&v,
&k.contiguous()?,
&v.contiguous()?,
attention_mask,
Some(key_cache),
Some(value_cache),
Expand All @@ -204,8 +204,8 @@ impl Attention {
assert!(attention_mask.is_some());
paged_attn.forward(
&q,
&k,
&v,
&k.contiguous()?,
&v.contiguous()?,
attention_mask,
None,
None,
Expand Down
8 changes: 4 additions & 4 deletions mistralrs-core/src/vision_models/phi3/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ impl Attention {
Some(paged_attn) => match metadata {
Some(((key_cache, value_cache), input_metadata)) => paged_attn.forward(
&q,
&k,
&v,
&k.contiguous()?,
&v.contiguous()?,
attention_mask,
Some(key_cache),
Some(value_cache),
Expand All @@ -284,8 +284,8 @@ impl Attention {
assert!(attention_mask.is_some());
paged_attn.forward(
&q,
&k,
&v,
&k.contiguous()?,
&v.contiguous()?,
attention_mask,
None,
None,
Expand Down

0 comments on commit a853cdd

Please sign in to comment.