Skip to main content

MambaBlockConfig

Trait MambaBlockConfig 

Source
pub trait MambaBlockConfig: Config {
    type Block: MambaBlock;

    // Required methods
    fn d_model(&self) -> usize;
    fn init_block(&self, device: &Device) -> Self::Block;
}
Expand description

A block config that knows its d_model and how to build its MambaBlock. Lets the generic builders construct Layers<M> without knowing the family.

Required Associated Types§

Source

type Block: MambaBlock

The block this config builds.

Required Methods§

Source

fn d_model(&self) -> usize

Model width, used to size each layer’s pre-norm.

Source

fn init_block(&self, device: &Device) -> Self::Block

Allocate and initialise the block on device.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§