vllm.model_executor.models.mimo_audio
¶
MiMo audio: tokenizer, encoding utilities, and audio encoder.
Ported from SGLang's mimo_audio.py. Audio tokenizer adapted from https://github.com/XiaomiMiMo/MiMo-Audio-Tokenizer.git
Classes:
-
MimoAudioEncoder–Audio encoder for MiMo-V2-Omni.
-
MimoAudioEncoderConfig–Config for MimoAudioEncoder.
Functions:
-
tokenize_audio_batch–Tokenize multiple mels in one encode_batch call.
MimoAudioEncoder
¶
Bases: Module
Audio encoder for MiMo-V2-Omni.
Methods:
-
get_audio_feature–Encode mel spectrograms into LLM embedding space.
-
process_audio–Pad audio codes to group_size boundary.
MimoAudioEncoderConfig
dataclass
¶
Config for MimoAudioEncoder.
Field names match the audio_config dict in the model checkpoint.
_segment_lengths_for_mel(mel, segment_size)
¶
Split mel into segments of segment_size with a possible shorter remainder.
tokenize_audio_batch(mels, audio_tokenizer_encoder, segment_size=6000, device=None)
¶
Tokenize multiple mels in one encode_batch call.
Returns list of code tensors, each [T_i, C] for that mel.