pub struct MambaConfig {Show 21 fields
pub vocab_size: usize,
pub hidden_size: usize,
pub num_hidden_layers: usize,
pub d_state: usize,
pub d_conv: usize,
pub expand: usize,
pub dt_rank: usize,
pub d_inner: usize,
pub dt_scale: f32,
pub dt_min: f32,
pub dt_max: f32,
pub dt_init_floor: f32,
pub conv_bias: bool,
pub bias: bool,
pub layer_norm_epsilon: f32,
pub rms_norm: bool,
pub initializer_range: f32,
pub tie_embeddings: bool,
pub pad_token_id: i64,
pub bos_token_id: i64,
pub eos_token_id: i64,
}Fields§
§vocab_size: usize§d_state: usize§d_conv: usize§expand: usize§dt_rank: usize§d_inner: usize§dt_scale: f32§dt_min: f32§dt_max: f32§dt_init_floor: f32§conv_bias: bool§bias: bool§layer_norm_epsilon: f32§rms_norm: bool§initializer_range: f32§tie_embeddings: bool§pad_token_id: i64§bos_token_id: i64§eos_token_id: i64Implementations§
Source§impl MambaConfig
impl MambaConfig
Sourcepub fn from_gguf_config(gguf: &GGUFModelConfig) -> Self
pub fn from_gguf_config(gguf: &GGUFModelConfig) -> Self
Create MambaConfig from GGUF model configuration
Sourcepub fn effective_d_inner(&self) -> usize
pub fn effective_d_inner(&self) -> usize
Get the effective d_inner (inner dimension)
Sourcepub fn effective_dt_rank(&self) -> usize
pub fn effective_dt_rank(&self) -> usize
Get the effective dt_rank
Trait Implementations§
Source§impl Clone for MambaConfig
impl Clone for MambaConfig
Source§fn clone(&self) -> MambaConfig
fn clone(&self) -> MambaConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MambaConfig
impl Debug for MambaConfig
Source§impl Default for MambaConfig
impl Default for MambaConfig
Source§impl<'de> Deserialize<'de> for MambaConfig
impl<'de> Deserialize<'de> for MambaConfig
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 ModelConfig for MambaConfig
impl ModelConfig for MambaConfig
Auto Trait Implementations§
impl Freeze for MambaConfig
impl RefUnwindSafe for MambaConfig
impl Send for MambaConfig
impl Sync for MambaConfig
impl Unpin for MambaConfig
impl UnsafeUnpin for MambaConfig
impl UnwindSafe for MambaConfig
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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