Bump the version number to 0.5.1. (#2155)

* Bump the version number to 0.5.1.

* Fix clippy lints for 1.78.

* More clippy fixes.
This commit is contained in:
Laurent Mazare
2024-05-03 11:17:05 +02:00
committed by GitHub
parent a09d451d11
commit 89f53b9d7b
12 changed files with 22 additions and 80 deletions

View File

@ -72,7 +72,7 @@ impl RotaryEmbedding {
let (xs1, xs2) = (&xs12[0], &xs12[1]);
let c = self.cos.narrow(0, seqlen_offset, seq_len)?;
let s = self.sin.narrow(0, seqlen_offset, seq_len)?;
let rotate_half = Tensor::cat(&[&xs2.neg()?, &xs1], D::Minus1)?;
let rotate_half = Tensor::cat(&[&xs2.neg()?, xs1], D::Minus1)?;
let xs_rot = (xs_rot.broadcast_mul(&c)? + rotate_half.broadcast_mul(&s)?)?;
Tensor::cat(&[&xs_rot, &xs_pass], D::Minus1)
}