MiniCPMo<T>

Models & Types · AiDotNet.VisionLanguage.InstructionTuned

MiniCPM-o: omnimodal VLM with speech and real-time streaming support.

Inheritance: NeuralNetworkBase<T> → VisionLanguageModelBase<T> → MiniCPMo<T>

Implements: IInstructionTunedVLM<T>

For Beginners

MiniCPM-o extends MiniCPM-V beyond just images to handle speech and real-time video streaming. It can see, hear, and speak — processing live video feeds, understanding spoken questions, and responding with generated speech, all in a compact model designed for on-device deployment. Think of it as a GPT-4o-level multimodal assistant that can run on your own hardware, supporting real-time conversations about what it sees and hears. Default values follow the original paper settings.

How It Works

MiniCPM-o (OpenBMB, 2025) extends MiniCPM-V to become an omnimodal model that handles vision, speech, and real-time streaming in a unified architecture. It adds speech understanding and generation capabilities alongside the existing visual understanding, enabling applications like live video narration, real-time visual question answering with voice input/output, and multimodal live streaming analysis. Despite its compact size, it achieves GPT-4o-level performance on many multimodal benchmarks.

References:

  • Paper: “MiniCPM-o: A GPT-4o Level MLLM for Vision, Speech and Multimodal Live Streaming” (2025)

Example

// Create a MiniCPM-o model for omnimodal vision + speech understanding
// with real-time streaming and on-device deployment
var architecture = new NeuralNetworkArchitecture<double>(
    inputType: InputType.TwoDimensional,
    taskType: NeuralNetworkTaskType.ImageClassification,
    inputHeight: 224, inputWidth: 224, inputDepth: 3, outputSize: 512);
            
// ONNX inference mode with pre-trained model
var model = new MiniCPMo<double>(architecture, "minicpmo.onnx");
            
// Training mode with native layers
var trainModel = new MiniCPMo<double>(architecture, new MiniCPMoOptions());

Constructors

Constructor Summary
MiniCPMo(NeuralNetworkArchitecture<T> architecture, MiniCPMoOptions options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer)
MiniCPMo(NeuralNetworkArchitecture<T> architecture, string modelPath, MiniCPMoOptions options)

Properties

Property Summary
int DecoderEmbeddingDim { get; }
int EmbeddingDimension { get; }
int MaxGenerationLength { get; }
string LanguageModelName { get; }

Methods

Method Summary
ModelMetadata<T> GetModelMetadata()
Tensor<T> Chat(Tensor<T> image, IEnumerable<ValueTuple<string, string>> conversationHistory, string userMessage)
Tensor<T> EncodeImage(Tensor<T> image)
Tensor<T> GenerateFromImage(Tensor<T> image, string prompt) Generates text using MiniCPM-o’s omni-modal architecture.