Skip to content

Commit

Permalink
Fix mistral attention on Metal (#2699)
Browse files Browse the repository at this point in the history
Co-authored-by: Luka Zakrajsek <[email protected]>
  • Loading branch information
bancek and lukazakrajsek-soniox authored Jan 4, 2025
1 parent cbaa0ad commit 57f41da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion candle-transformers/src/models/mistral.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@ impl Attention {
.contiguous()?;
let value_states = value_states
.reshape((b_sz, q_len, self.num_kv_heads, self.head_dim))?
.transpose(1, 2)?;
.transpose(1, 2)?
.contiguous()?;

let (query_states, key_states) =
self.rotary_emb
Expand Down

0 comments on commit 57f41da

Please sign in to comment.