pub enum StatePairing {
Real,
ComplexInterleaved {
num_pairs: usize,
},
ComplexHalfHalf {
num_pairs: usize,
},
QuaternionBlocks {
num_blocks: usize,
},
}Expand description
How the state_rank axis of a (realified) SSM state groups into complex /
quaternionic coordinates — the realification layout the Mamba-3 rotation
applies to B/C (and hence to the state). Consumed by
StateMoments::pr_complex.
Construct it with Mamba3::state_pairing() (the single source of truth,
mirroring exactly what rotate_bc_forward applies) — never re-derive the
layout by hand.
Variants§
Real
No rotation pairing: every coordinate is real (rope_fraction = 0);
StateMoments::pr_complex then equals StateMoments::pr.
ComplexInterleaved
Complex pairs, interleaved (NeoX-style; Mamba-3 SISO): coordinate 2a
is the real and 2a + 1 the imaginary part of complex coordinate a,
for a < num_pairs; the tail [2·num_pairs, state_rank) stays real.
ComplexHalfHalf
Complex pairs, half-and-half (GPT-J-style; Mamba-3 MIMO): coordinate
a is the real and state_rank/2 + a the imaginary part, for
a < num_pairs; the remainder of both halves stays real.
QuaternionBlocks
Quaternion blocks (Mamba-3 Quaternion4D): coordinates [4j, 4j + 4)
form quaternion coordinate j (components ordered w, x, y, z), for
j < num_blocks; the tail stays real.
Trait Implementations§
Source§impl Clone for StatePairing
impl Clone for StatePairing
Source§fn clone(&self) -> StatePairing
fn clone(&self) -> StatePairing
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for StatePairing
Source§impl Debug for StatePairing
impl Debug for StatePairing
impl Eq for StatePairing
Source§impl PartialEq for StatePairing
impl PartialEq for StatePairing
impl StructuralPartialEq for StatePairing
Auto Trait Implementations§
impl Freeze for StatePairing
impl RefUnwindSafe for StatePairing
impl Send for StatePairing
impl Sync for StatePairing
impl Unpin for StatePairing
impl UnsafeUnpin for StatePairing
impl UnwindSafe for StatePairing
Blanket Implementations§
impl<T> Boilerplate for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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
key and return true if they are equal.