Skip to main content

Mamba3SsdInput

Struct Mamba3SsdInput 

Source
pub struct Mamba3SsdInput<B: Backend> {
    pub v_bnlrhp: Tensor<B, 6>,
    pub da_bnlh: Tensor<B, 4>,
    pub b_bnlrhn: Tensor<B, 6>,
    pub c_bnlrhn: Tensor<B, 6>,
    pub initial_state_bhpr: Tensor<B, 4>,
    pub init_state_hpr: Option<Tensor<B, 3>>,
}
Expand description

MIMO-first SSD input.

All tensors are pre-processed: B/C are already QK-normed, RoPE-applied, bias-added, and expanded to per-head (not per-group). V is already scaled by the trapezoidal coefficient (γ or β). The combined log-decay da = Δ·A is pre-computed. D skip is handled by the caller.

Fields§

§v_bnlrhp: Tensor<B, 6>

Value tensor, already scaled by trapezoidal coefficient (γ or β).

§Shape

  • [batch, nchunks, chunk_len, mimo_rank, nheads, per_head_dim]
§da_bnlh: Tensor<B, 4>

Pre-combined log-decay Δ·A (negative).

§Shape

  • [batch, nchunks, chunk_len, nheads]
§b_bnlrhn: Tensor<B, 6>

Key/B tensor: QK-normed, RoPE-applied, bias-added, expanded to per-head, per-rank.

§Shape

  • [batch, nchunks, chunk_len, mimo_rank, nheads, state_rank]
§c_bnlrhn: Tensor<B, 6>

Query/C tensor: same processing as B.

§Shape

  • [batch, nchunks, chunk_len, mimo_rank, nheads, state_rank]
§initial_state_bhpr: Tensor<B, 4>

Initial SSM hidden state.

§Shape

  • [batch, nheads, per_head_dim, state_rank]
§init_state_hpr: Option<Tensor<B, 3>>

Optional learnable initial state (broadcast over batch).

§Shape

  • [nheads, per_head_dim, state_rank]

Implementations§

Source§

impl<B: Backend> Mamba3SsdInput<B>

Source

pub fn sanity(&self)

Auto Trait Implementations§

§

impl<B> Freeze for Mamba3SsdInput<B>
where <B as BackendTypes>::FloatTensorPrimitive: Freeze, <B as BackendTypes>::QuantizedTensorPrimitive: Freeze,

§

impl<B> RefUnwindSafe for Mamba3SsdInput<B>
where <B as BackendTypes>::FloatTensorPrimitive: RefUnwindSafe, <B as BackendTypes>::QuantizedTensorPrimitive: RefUnwindSafe,

§

impl<B> Send for Mamba3SsdInput<B>

§

impl<B> Sync for Mamba3SsdInput<B>

§

impl<B> Unpin for Mamba3SsdInput<B>
where <B as BackendTypes>::FloatTensorPrimitive: Unpin, <B as BackendTypes>::QuantizedTensorPrimitive: Unpin,

§

impl<B> UnsafeUnpin for Mamba3SsdInput<B>
where <B as BackendTypes>::FloatTensorPrimitive: UnsafeUnpin, <B as BackendTypes>::QuantizedTensorPrimitive: UnsafeUnpin,

§

impl<B> UnwindSafe for Mamba3SsdInput<B>
where <B as BackendTypes>::FloatTensorPrimitive: UnwindSafe, <B as BackendTypes>::QuantizedTensorPrimitive: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.