pub struct RopeSpec {
pub q: Symbol,
pub rc: Symbol,
pub rs: Symbol,
pub out: Symbol,
pub h: usize,
pub half: usize,
pub hd: usize,
pub rows: usize,
pub from: Option<(RowIndex, usize)>,
}Expand description
Qr = rope(Q, cos, sin) — RoPE-NEOX over h heads of hd dims, rotating each head’s leading 2·half
dims as (i, i+half) pairs and passing the remaining hd − 2·half through (Qwen3.8’s partial rotary;
hd == 2·half is the classic full form). hd is read off the pass-through loop’s bound.
Fields§
§q: Symbol§rc: Symbol§rs: Symbol§out: Symbol§h: usize§half: usize§hd: usize§rows: usizeThe tables’ rows: 1 — every head turns by the one row of angles — or one per row of Q, head v turning by
table row v / (h / rows). With from, the rows of Q.
from: Option<(RowIndex, usize)>from position P: the tables are a cache of angles for this many positions, and row r of Q (0-based) turns
by cache row P + r (1-based) — P checked to keep the block’s rows among the cache’s.
Trait Implementations§
impl Eq for RopeSpec
impl StructuralPartialEq for RopeSpec
Auto Trait Implementations§
impl Freeze for RopeSpec
impl RefUnwindSafe for RopeSpec
impl Send for RopeSpec
impl Sync for RopeSpec
impl Unpin for RopeSpec
impl UnsafeUnpin for RopeSpec
impl UnwindSafe for RopeSpec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.