Skip to content

vllm.model_executor.models.minicpmo

Inference-only MiniCPM-O model compatible with HuggingFace weights.

Classes:

MiniCPMO

Bases: MiniCPMOBaseModel, MiniCPMV2_6

MiniCPM-O model with audio support. Different versions use different LLM backbones: - Version 2.6: Uses Qwen2 - Version 4.5: Uses Qwen3

MiniCPMO2_6

Bases: MiniCPMOBaseModel, MiniCPMV2_6

MiniCPM-O 2.6 model with Qwen2 backbone.

MiniCPMO4_5

Bases: MiniCPMOBaseModel, MiniCPMV4_5

MiniCPM-O 4.5 model with Qwen3 backbone.

MiniCPMOAudioEmbeddingInputs

Bases: TensorSchema

Dimensions
  • bn: Batch size * number of audios
  • s: Number of slices
  • h: Hidden size (must match language model backbone)

Length of each slice may vary, so pass it as a list.

MiniCPMOAudioFeatureInputs

Bases: TensorSchema

Dimensions: - bns: Batch size * number of audios * number of slices - bn: Batch size * number of audios - c: Number of channels - l: Length - s: Number of slices

Attributes:

audio_feature_lens instance-attribute

This should be feature length of each audio slice, which equals to audio_features.shape[-1]

audio_features instance-attribute

Slice here means chunk. Audio that is too long will be split into slices, which is the same as image. Padding is used therefore audio_features is torch.Tensor.

MiniCPMOBaseModel

Bases: _MiniCPMOBaseModelBase

Base mixin class for MiniCPM-O models with audio support.

MiniCPMOProcessingInfo

Bases: MiniCPMVProcessingInfo

Methods:

  • get_hf_processor –

    Get vendored MiniCPMOProcessor for multimodal (image+audio) inputs.

get_hf_processor(**kwargs)

Get vendored MiniCPMOProcessor for multimodal (image+audio) inputs.

Creates a vendored processor that uses the checkpoint-specific HF image processor, feature extractor, and tokenizer; applies the correct audio pooling configuration; and converts numpy arrays in the image processor to lists for serialization compatibility. The returned processor is compatible with Transformers v5.