Document OCR with MiniCPM-OCR and OpenVINO
MiniCPM-OCR is a document-understanding model from the MiniCPM-V family developed by OpenBMB. It keeps the MiniCPM-V 4.6 architecture, a SigLIP vision encoder with a window-attention merger in front
Content
Document OCR with MiniCPM-OCR and OpenVINO
MiniCPM-OCR is a document-understanding model from the MiniCPM-V family developed by OpenBMB. It keeps the MiniCPM-V 4.6 architecture, a SigLIP vision encoder with a window-attention merger in front of a Qwen3.5 language model, and specializes it for reading text-dense images such as scanned pages, screenshots, receipts and tables.
The model reads images with 4x visual downsampling by default, which keeps 4× more visual tokens than the 16x mode of general-purpose MiniCPM-V models, and can reason in a thinking block before answering.
More details about the model can be found in the model card, the Transformers documentation and the original repo.
Notebook Contents
The tutorial consists of the following steps:
- Install prerequisites
- Convert the model to OpenVINO IR and compress its weights using Optimum Intel CLI
- Load the model with
OVModelForVisualCausalLMon CPU, GPU or, as a preview, with the language model on NPU - Recognize the text of a receipt, convert a page to Markdown, read Chinese text and extract key information from a document
- Score OCR results with the MiniCPM-OCR Jev quality-decision model loaded with
OVModelForVisualSequenceClassification - Measure accuracy against the original PyTorch model and generation performance
- Launch an interactive Gradio demo with optional Jev verification
Installation Instructions
This is a self-contained example that relies solely on its own code.</br> We recommend running the notebook in a virtual environment. You only need a Jupyter server to start. For further details, please refer to [Installation Guide](../../README.md).
⚠️ EXPERIMENTAL NOTEBOOK
This notebook demonstrates a model that has not been fully validated with OpenVINO. It uses Optimum Intel >= 2.3.0, Transformers 5.21.0, and OpenVINO >= 2026.5.0 packages. It may be fully supported and validated in the future.
Source and license
- Source
- Intel OpenVINO Notebooks
- Original
- openvinotoolkit/openvino_notebooks/notebooks/minicpm-ocr
- License
- Apache-2.0