pub struct Mamba3CachesConfig {
pub n_real_caches: usize,
pub cache: Mamba3CacheConfig,
}Expand description
Configuration / factory for Mamba3Caches.
Fields§
§n_real_caches: usizeNumber of cache slots (= number of virtual layers).
cache: Mamba3CacheConfigShared configuration that determines the shape of each cache.
Implementations§
Source§impl Mamba3CachesConfig
impl Mamba3CachesConfig
Sourcepub fn new_from_block_config(
n_real_caches: usize,
batch: usize,
block_config: Mamba3Config,
) -> Self
pub fn new_from_block_config( n_real_caches: usize, batch: usize, block_config: Mamba3Config, ) -> Self
Convenience constructor from a block config.
Sourcepub fn init<B: Backend>(&self, device: &B::Device) -> Mamba3Caches<B>
pub fn init<B: Backend>(&self, device: &B::Device) -> Mamba3Caches<B>
Allocate all cache tensors (zero-initialised) on device.
Trait Implementations§
Source§impl Clone for Mamba3CachesConfig
impl Clone for Mamba3CachesConfig
Source§impl Config for Mamba3CachesConfig
impl Config for Mamba3CachesConfig
§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 Mamba3CachesConfig
impl Debug for Mamba3CachesConfig
Source§impl<'de> Deserialize<'de> for Mamba3CachesConfig
impl<'de> Deserialize<'de> for Mamba3CachesConfig
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 Mamba3CachesConfig
impl Display for Mamba3CachesConfig
Auto Trait Implementations§
impl Freeze for Mamba3CachesConfig
impl RefUnwindSafe for Mamba3CachesConfig
impl Send for Mamba3CachesConfig
impl Sync for Mamba3CachesConfig
impl Unpin for Mamba3CachesConfig
impl UnsafeUnpin for Mamba3CachesConfig
impl UnwindSafe for Mamba3CachesConfig
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