Skip to main content
Back

MiniCPM-OCR

MiniCPM-V Multimodal Series

MiniCPM-OCR is a family of models for efficient document parsing and text recognition, releasing a parsing model and a System-1 decision model together for the first time:

  • MiniCPM-OCR 1.0 (parsing model): With just 1.3B parameters, it achieves SOTA results on both Real5-OmniDocBench (93.68) and OCRBench v2 (54.7), supporting efficient parsing of scans, photographs, curved, skewed and recaptured documents.
  • MiniCPM-OCR Jev (decision model): It assesses the quality of text, formula and table parsing results and returns calibrated probabilities, without parsing text itself (JevOCRBench overall: 93.5), helping developers evaluate parsing quality and identify results that need closer review.

Model List​

CheckpointParametersArchitectureTask
MiniCPM-OCR-1.01.3BSigLIP + Qwen3.5, trained from MiniCPM-V 4.6Document parsing, recognition and field extraction
MiniCPM-OCR-Jev2BQwen3.5-2B + binary classification headQuality assessment for text, formulas and tables

Core Features​

MiniCPM-OCR 1.0​

  • Document recognition: Chinese and English text, tables, formulas, charts, seals and key information extraction.
  • Complete-document parsing: The minicpmvocr SDK combines PP-DocLayoutV3 layout detection with the recognition service. It assembles Markdown in reading order, converts OTSL tables to HTML and preserves LaTeX formulas.
  • DSpark acceleration: Speculative decoding uses a matching draft model from the same release; standard decoding is also available.

MiniCPM-OCR Jev​

  • Region-level decisions: The model takes the original region image, candidate OCR text and its rendered image. A renderer-enabled service only requires the original image, candidate text and the correct category.
  • Review routing: Calibrate acceptance thresholds on your labelled business samples and route lower-scoring regions for review.
  • Candidate selection: Score outputs from multiple OCR models using the same crop boundaries and select the highest-scoring candidate. Regions with no acceptable candidate can still go to review.

Evaluation​

ModelBenchmarkReported score
MiniCPM-OCR 1.0Real5-OmniDocBench93.68
MiniCPM-OCR 1.0OCRBench v254.7
MiniCPM-OCR JevJevOCRBench (overall)93.5

The parsing throughput reference is about 1.2 pages/s on an RTX 5090, using 1,651 OmniDocBench v1.6 images, image-level concurrency 1 and the accelerated configuration. Regions within a page can still run concurrently. Hardware, page content and concurrency affect throughput.

Quick Start​

Start with the published Linux x86_64 / NVIDIA recipe, verified on RTX 5090 32 GB. It uses Python 3.12 and driver ≥580 (CUDA 13); reserve at least 40 GB disk. The SDK and recognition backend run in separate environments.

vLLM​

Install the matching backend using the repository script:

Bash
git clone https://github.com/OpenBMB/MiniCPM-OCR.git
cd MiniCPM-OCR
apt-get update
apt-get install -y software-properties-common
add-apt-repository -y ppa:ubuntu-toolchain-r/test
apt-get update
apt-get install -y gcc-13 g++-13 libdw-dev libelf-dev
bash scripts/install.sh vllm

Open another terminal at the repository root and launch the service:

Bash
source .venv-vllm/bin/activate
export CC=gcc-13 CXX=g++-13
export CUDA_HOME="$(python -c 'import sysconfig; print(sysconfig.get_path("purelib") + "/nvidia/cu13")')"
export PATH="$CUDA_HOME/bin:$PATH"

vllm serve openbmb/MiniCPM-OCR-1.0 \
--served-model-name minicpm-ocr \
--host 127.0.0.1 \
--port 18499 \
--max-model-len 40960 \
--max-num-batched-tokens 40960 \
--max-num-seqs 32 \
--limit-mm-per-prompt '{"image":36,"video":0}' \
--attention-backend FLASH_ATTN \
--mm-encoder-attn-backend FLASH_ATTN \
--mm-processor-kwargs '{"downsample_mode":"4x"}' \
--gpu-memory-utilization 0.85 \
--trust-request-mm-kwargs \
--speculative-config '{
"method": "dspark",
"model": "openbmb/MiniCPM-OCR-1.0-DSpark",
"num_speculative_tokens": 15,
"enable_adaptive_verification": false
}' \
--default-chat-template-kwargs '{"enable_thinking":false}'

Check that the service returns minicpm-ocr:

Bash
curl -fsS http://127.0.0.1:18499/v1/models

The command enables DSpark with a matching draft model. For standard decoding, remove the entire --speculative-config argument and JSON value. Complete backend setup and troubleshooting are in Deployment.

CLI​

Keep the recognition service running. At the repository root, install the SDK in its own environment and parse doc.pdf:

Bash
pip install uv
uv venv .minicpm-ocr --python 3.12 --seed
source .minicpm-ocr/bin/activate
python -m pip install "minicpm-ocr[all]==1.0.2"
python -m pip install "paddlepaddle-gpu==3.3.0" \
-i https://www.paddlepaddle.org.cn/packages/stable/cu129/

minicpmvocr parse \
--device cuda:0 \
--server-url http://127.0.0.1:18499 \
--model minicpm-ocr \
--input doc.pdf \
--output doc.md

The SDK downloads missing layout weights automatically. Check doc.md for the parsing result. For region recognition and Jev scoring, see Inference and Jev inference.

TopicLink
Code RepositoryOpenBMB/MiniCPM-OCR
Online demoMiniCPM-OCR Demo
API AccessAPI
Official DocumentationSDK
EvaluationOCR 1.0 / Jev / Reproduction / JevOCRBench
Fine-tuningMiniCPM-OCR
DeploymentMiniCPM-OCR Deployment
InferenceMiniCPM-OCR Inference
QuantizationMiniCPM-OCR Quantization
Model WeightsOCR 1.0 / Jev