pub struct BoundedRope {
pub window: usize,
pub half: usize,
pub cos: Vec<f32>,
pub sin: Vec<f32>,
}Expand description
Relative-rotation table: cos/sin[Δ][i] = cos/sin(Δ · inv_freq[i])
for Δ ∈ [0, W), built once per model from the layer’s inv_freq
(same convention as attention::rope_rotate_scaled, angles computed
in f64 so the table carries only the final f32 rounding).
Fields§
§window: usize§half: usizerotary_dim / 2: dims [0, half) pair with [half, 2·half);
dims past 2·half are copied unrotated (partial rotary).
cos: Vec<f32>§sin: Vec<f32>Implementations§
Trait Implementations§
Source§impl Clone for BoundedRope
impl Clone for BoundedRope
Auto Trait Implementations§
impl Freeze for BoundedRope
impl RefUnwindSafe for BoundedRope
impl Send for BoundedRope
impl Sync for BoundedRope
impl Unpin for BoundedRope
impl UnsafeUnpin for BoundedRope
impl UnwindSafe for BoundedRope
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more