pub struct Mamba1CachesConfig {
pub n_layers: usize,
pub cache: Mamba1CacheConfig,
}Fields§
§n_layers: usize§cache: Mamba1CacheConfigImplementations§
Source§impl Mamba1CachesConfig
impl Mamba1CachesConfig
pub fn new_from_block_config( n_layers: usize, batch: usize, block_config: Mamba1Config, ) -> Self
Sourcepub fn init<B: Backend>(&self, device: &B::Device) -> Mamba1Caches<B>
pub fn init<B: Backend>(&self, device: &B::Device) -> Mamba1Caches<B>
Returns the initialized model.
Trait Implementations§
Source§impl Clone for Mamba1CachesConfig
impl Clone for Mamba1CachesConfig
Source§impl Config for Mamba1CachesConfig
impl Config for Mamba1CachesConfig
§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 Mamba1CachesConfig
impl Debug for Mamba1CachesConfig
Source§impl<'de> Deserialize<'de> for Mamba1CachesConfig
impl<'de> Deserialize<'de> for Mamba1CachesConfig
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 Mamba1CachesConfig
impl Display for Mamba1CachesConfig
Auto Trait Implementations§
impl Freeze for Mamba1CachesConfig
impl RefUnwindSafe for Mamba1CachesConfig
impl Send for Mamba1CachesConfig
impl Sync for Mamba1CachesConfig
impl Unpin for Mamba1CachesConfig
impl UnsafeUnpin for Mamba1CachesConfig
impl UnwindSafe for Mamba1CachesConfig
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