diff --git a/candle-transformers/src/models/mistral.rs b/candle-transformers/src/models/mistral.rs index f927f88b2..8df73d61e 100644 --- a/candle-transformers/src/models/mistral.rs +++ b/candle-transformers/src/models/mistral.rs @@ -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