pub struct Mamba2BidiLayerPairConfig {
pub straight_block: Mamba2Config,
pub reverse_block: Mamba2Config,
pub residual_scale: f32,
pub output_merge: OutputMergeConfig,
}Fields§
§straight_block: Mamba2Config§reverse_block: Mamba2Config§residual_scale: f32§output_merge: OutputMergeConfigImplementations§
Source§impl Mamba2BidiLayerPairConfig
impl Mamba2BidiLayerPairConfig
Sourcepub fn new(
straight_block: Mamba2Config,
reverse_block: Mamba2Config,
output_merge: OutputMergeConfig,
) -> Self
pub fn new( straight_block: Mamba2Config, reverse_block: Mamba2Config, output_merge: OutputMergeConfig, ) -> Self
Source§impl Mamba2BidiLayerPairConfig
impl Mamba2BidiLayerPairConfig
Sourcepub fn with_residual_scale(self, residual_scale: f32) -> Self
pub fn with_residual_scale(self, residual_scale: f32) -> Self
Sets the value for the field residual_scale.
- Defaults to
1.0
Source§impl Mamba2BidiLayerPairConfig
impl Mamba2BidiLayerPairConfig
Sourcepub fn init<B: Backend>(&self, device: &B::Device) -> Mamba2BidiLayerPair<B>
pub fn init<B: Backend>(&self, device: &B::Device) -> Mamba2BidiLayerPair<B>
Returns the initialized model.
Trait Implementations§
Source§impl Clone for Mamba2BidiLayerPairConfig
impl Clone for Mamba2BidiLayerPairConfig
Source§impl Config for Mamba2BidiLayerPairConfig
impl Config for Mamba2BidiLayerPairConfig
§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 Mamba2BidiLayerPairConfig
impl Debug for Mamba2BidiLayerPairConfig
Source§impl<'de> Deserialize<'de> for Mamba2BidiLayerPairConfig
impl<'de> Deserialize<'de> for Mamba2BidiLayerPairConfig
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 Mamba2BidiLayerPairConfig
impl Display for Mamba2BidiLayerPairConfig
Auto Trait Implementations§
impl Freeze for Mamba2BidiLayerPairConfig
impl RefUnwindSafe for Mamba2BidiLayerPairConfig
impl Send for Mamba2BidiLayerPairConfig
impl Sync for Mamba2BidiLayerPairConfig
impl Unpin for Mamba2BidiLayerPairConfig
impl UnsafeUnpin for Mamba2BidiLayerPairConfig
impl UnwindSafe for Mamba2BidiLayerPairConfig
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