pub struct SelectiveSSM { /* private fields */ }Expand description
Selective State Space Model (Mamba-style)
Implements the selective scan mechanism from Mamba for content-aware state transitions.
Implementations§
Source§impl SelectiveSSM
impl SelectiveSSM
Sourcepub fn new(config: KizzasiConfig) -> CoreResult<Self>
pub fn new(config: KizzasiConfig) -> CoreResult<Self>
Create a new SelectiveSSM from configuration
Sourcepub fn get_state(&self) -> &HiddenState
pub fn get_state(&self) -> &HiddenState
Get a reference to the hidden state
Sourcepub fn get_state_mut(&mut self) -> &mut HiddenState
pub fn get_state_mut(&mut self) -> &mut HiddenState
Get a mutable reference to the hidden state
Sourcepub fn set_state(&mut self, state: HiddenState)
pub fn set_state(&mut self, state: HiddenState)
Set the hidden state
Sourcepub fn step_count(&self) -> usize
pub fn step_count(&self) -> usize
Get the step count from the hidden state
Sourcepub fn embedding(&self) -> &ContinuousEmbedding
pub fn embedding(&self) -> &ContinuousEmbedding
Get a reference to the embedding layer
Sourcepub fn output_proj(&self) -> &Array2<f32>
pub fn output_proj(&self) -> &Array2<f32>
Get a reference to the output projection matrix
Trait Implementations§
Source§impl Clone for SelectiveSSM
impl Clone for SelectiveSSM
Source§fn clone(&self) -> SelectiveSSM
fn clone(&self) -> SelectiveSSM
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SelectiveSSM
impl Debug for SelectiveSSM
Source§impl<'de> Deserialize<'de> for SelectiveSSM
impl<'de> Deserialize<'de> for SelectiveSSM
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for SelectiveSSM
impl Serialize for SelectiveSSM
Source§impl SignalPredictor for SelectiveSSM
impl SignalPredictor for SelectiveSSM
Source§impl StateSpaceModel for SelectiveSSM
impl StateSpaceModel for SelectiveSSM
Source§fn recurrence_step(
&self,
input: &Array1<f32>,
state: &mut HiddenState,
) -> CoreResult<Array1<f32>>
fn recurrence_step( &self, input: &Array1<f32>, state: &mut HiddenState, ) -> CoreResult<Array1<f32>>
Perform a single recurrence step
Source§fn config(&self) -> &KizzasiConfig
fn config(&self) -> &KizzasiConfig
Get model configuration
Auto Trait Implementations§
impl Freeze for SelectiveSSM
impl RefUnwindSafe for SelectiveSSM
impl Send for SelectiveSSM
impl Sync for SelectiveSSM
impl Unpin for SelectiveSSM
impl UnwindSafe for SelectiveSSM
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more