pub struct Mamba3BidiLayersConfig {
pub n_real_layers: usize,
pub n_virtual_layers: Option<(usize, BidiSchedule)>,
pub mamba_block: Mamba3Config,
pub ignore_first_residual: bool,
pub ignore_last_residual: bool,
pub outputs_merge: Vec<OutputMergeConfig>,
}Fields§
§n_real_layers: usize§n_virtual_layers: Option<(usize, BidiSchedule)>§mamba_block: Mamba3Config§ignore_first_residual: bool§ignore_last_residual: bool§outputs_merge: Vec<OutputMergeConfig>§Shape
- [n_real_layers / 2]
Implementations§
Source§impl Mamba3BidiLayersConfig
impl Mamba3BidiLayersConfig
Sourcepub fn new(
n_real_layers: usize,
mamba_block: Mamba3Config,
outputs_merge: Vec<OutputMergeConfig>,
) -> Self
pub fn new( n_real_layers: usize, mamba_block: Mamba3Config, outputs_merge: Vec<OutputMergeConfig>, ) -> Self
Source§impl Mamba3BidiLayersConfig
impl Mamba3BidiLayersConfig
Sourcepub fn with_n_virtual_layers(
self,
n_virtual_layers: Option<(usize, BidiSchedule)>,
) -> Self
pub fn with_n_virtual_layers( self, n_virtual_layers: Option<(usize, BidiSchedule)>, ) -> Self
Sets the value for the field n_virtual_layers.
- Defaults to
"None"
Sourcepub fn with_ignore_first_residual(self, ignore_first_residual: bool) -> Self
pub fn with_ignore_first_residual(self, ignore_first_residual: bool) -> Self
Sets the value for the field ignore_first_residual.
- Defaults to
false
Sourcepub fn with_ignore_last_residual(self, ignore_last_residual: bool) -> Self
pub fn with_ignore_last_residual(self, ignore_last_residual: bool) -> Self
Sets the value for the field ignore_last_residual.
- Defaults to
false
Source§impl Mamba3BidiLayersConfig
impl Mamba3BidiLayersConfig
Sourcepub fn init<B: Backend>(&self, device: &B::Device) -> Mamba3BidiLayers<B>
pub fn init<B: Backend>(&self, device: &B::Device) -> Mamba3BidiLayers<B>
Returns the initialized model.
Trait Implementations§
Source§impl Clone for Mamba3BidiLayersConfig
impl Clone for Mamba3BidiLayersConfig
Source§impl Config for Mamba3BidiLayersConfig
impl Config for Mamba3BidiLayersConfig
§fn load_binary(data: &[u8]) -> Result<Self, ConfigError>
fn load_binary(data: &[u8]) -> Result<Self, ConfigError>
Loads the configuration from a binary buffer. Read more
Source§impl Debug for Mamba3BidiLayersConfig
impl Debug for Mamba3BidiLayersConfig
Source§impl<'de> Deserialize<'de> for Mamba3BidiLayersConfig
impl<'de> Deserialize<'de> for Mamba3BidiLayersConfig
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 Display for Mamba3BidiLayersConfig
impl Display for Mamba3BidiLayersConfig
Auto Trait Implementations§
impl Freeze for Mamba3BidiLayersConfig
impl RefUnwindSafe for Mamba3BidiLayersConfig
impl Send for Mamba3BidiLayersConfig
impl Sync for Mamba3BidiLayersConfig
impl Unpin for Mamba3BidiLayersConfig
impl UnsafeUnpin for Mamba3BidiLayersConfig
impl UnwindSafe for Mamba3BidiLayersConfig
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