pub struct MimoAudio {
pub tokenizer: AudioTokenizer,
pub encoder: AudioEncoder,
pub bf16_codebooks: bool,
/* private fields */
}Expand description
The MiMo audio towers.
Fields§
§tokenizer: AudioTokenizer§encoder: AudioEncoder§bf16_codebooks: boolQuantize against bf16-rounded codebooks, as the bf16 serving stacks
do (default on; CMF_MIMO_AUDIO_BF16_BOOKS=0 turns it off).
Implementations§
Source§impl MimoAudio
impl MimoAudio
Sourcepub fn present_in(model: &CmfModel) -> bool
pub fn present_in(model: &CmfModel) -> bool
Whether a CMF carries the audio towers (a companion or a single-file multimodal container).
Sourcepub fn from_model(model: &Arc<CmfModel>) -> Result<Self, String>
pub fn from_model(model: &Arc<CmfModel>) -> Result<Self, String>
Load from a CMF holding the source tensor names (the <stem>.mm.cmf
companion or a single-file multimodal container).
Sourcepub fn from_hf_dir(dir: &Path) -> Result<Self, String>
pub fn from_hf_dir(dir: &Path) -> Result<Self, String>
Development loader: read the tensors straight from the HF checkpoint
directory (config.json, model.safetensors.index.json and its
shards, audio_tokenizer/), exact f32 from BF16.
pub fn pool(&self) -> Option<&Pool>
Sourcepub fn wav_to_mel(&self, bytes: &[u8]) -> Result<(Vec<f32>, usize), String>
pub fn wav_to_mel(&self, bytes: &[u8]) -> Result<(Vec<f32>, usize), String>
WAV bytes → 24 kHz mono → log-mel [M][128].
Sourcepub fn features(&self, mel: &[f32], m: usize) -> Result<Vec<f32>, String>
pub fn features(&self, mel: &[f32], m: usize) -> Result<Vec<f32>, String>
Pre-RVQ features of every segment, concatenated [codes][d].
Sourcepub fn encode_mel(&self, mel: &[f32], m: usize) -> Result<AudioCodes, String>
pub fn encode_mel(&self, mel: &[f32], m: usize) -> Result<AudioCodes, String>
Log-mel → tokenizer codes, each 6000-frame segment on its own.
Sourcepub fn embed_codes(&self, codes: &AudioCodes) -> Result<AudioEmbeds, String>
pub fn embed_codes(&self, codes: &AudioCodes) -> Result<AudioEmbeds, String>
Codes → LLM embedding rows.
Auto Trait Implementations§
impl !RefUnwindSafe for MimoAudio
impl !UnwindSafe for MimoAudio
impl Freeze for MimoAudio
impl Send for MimoAudio
impl Sync for MimoAudio
impl Unpin for MimoAudio
impl UnsafeUnpin for MimoAudio
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