OpenBMB · HF

呵

MiniCPM-OCR-1.0

MiniCPM-OCR-1.0

二〇二六年十月二十七日 · 英文原文

<div align="center"> [GitHub](https://github.com/OpenBMB/MiniCPM-OCR) · [API](https://github.com/OpenBMB/MiniCPM-OCR/blob/main/docs/minicpm_ocr_api_en.md) · [Demo](https://platform.modelbest.ai/console/playground/document-parse) ·…

GitHub · API · Demo · DSpark

MiniCPM-OCR 1.0 (1.3B) is the first OCR-specific model in the MiniCPM-V/o family. It focuses on text-centric document understanding — text, tables, formulas, charts, seals, and structured information extraction — and balances quality against speed on real-world captures.

Highlights

SOTA quality at higher throughput

Among the open-source OCR models compared, MiniCPM-OCR 1.0 reaches 1.2 pages/s and the highest equal-weight average score across OmniDocBench v1.6, Real5-OmniDocBench, Wild-OmniDocBench, and olmOCR-Bench.

Average score is the equal-weight mean of the four benchmarks. All models use accelerated configurations. Settings and reproduction: reproduction guide. Per-model throughput: model guide.

Benchmark comparisons

Full MiniCPM-OCR 1.0 evaluation results

Each panel keeps its own benchmark's scores; higher is better. Scores from different benchmarks are not directly comparable. Test settings and reproduction steps are in the reproduction guide; per-benchmark discussion is in the model guide.

Throughput

On an NVIDIA GeForce RTX 5090 with all 1651 OmniDocBench v1.6 images, image-level concurrency 1, and each system's accelerated configuration, MiniCPM-OCR 1.0 reaches 1.2 pages/s (relative throughput 1.00×; higher is faster).

Concurrency 1 is image-level: regions inside a page are still recognised in parallel. Real throughput also depends on page content, backend, concurrency, and hardware.

Examples

Left to right: original document, detected layout, and rendered Markdown.

English documents

Chinese documents

More examples

Original documents and parsed results, side by side.

English documents

Chinese documents

Model architecture

Item Description
Parameters 1.3B
Base Trained for OCR on top of MiniCPM-V 4.6
Components SigLIP vision encoder + Qwen3.5 language model
Primary languages Chinese and English
Tasks Text, tables, formulas, charts, seals, and key information extraction
Parsing pipeline MiniCPM-OCR 1.0 + PP-DocLayoutV3 layout model + minicpmvocr SDK
Visual tokens 4× compression, scale_resolution 448, up to 9 slices

See the model guide for architecture, parsing workflow, deployment options, and benchmark breakdowns.

Quick start

Document parsing (SDK)

The SDK parses whole documents; the model recognises regions:

  1. Read — accept PDF/PNG/JPG and rasterise PDF pages.
  2. Layout — PP-DocLayoutV3 detects regions and reading order, then crops them.
  3. Recognise — regions are sent to the MiniCPM-OCR 1.0 service concurrently.
  4. Assemble — results are merged into Markdown in reading order; tables become HTML, formulas stay LaTeX.

SDK and inference service use separate Python environments and may run on different machines. See the SDK tutorial.

vLLM

vllm serve openbmb/MiniCPM-OCR-1.0 \
  --served-model-name MiniCPM-OCR \
  --trust-remote-code \
  --max-model-len 40960

Full API example (request fields, image encoding, response checks): vLLM deploy guide.

Other runtimes

Runtime Guide
vLLM API service and single-region recognition
SGLang Deployment guide
llama.cpp GGUF deployment guide
Ollama SDK service connection and backend configuration
Transformers Service deployment
FlagOS (multi-chip) Deployment guide

Prompts

The prompt selects the task and must match the region you cropped:

Region Prompt Output
Text block / paragraph / title / page Text Recognition: plain text
Table Table Recognition: HTML (via SDK post-processing)
Formula Formula Recognition: LaTeX
Inline formula Text Recognition: LaTeX
Seal Seal Recognition: seal text
Chart Chart to Table: table

If finish_reason is length, the output was truncated — raise the token budget.

Key information extraction (KIE)

MiniCPM-OCR 1.0 can pull specified fields straight out of an image — for example the store name and amount on a receipt. Send the image with a field-extraction prompt and ask for a JSON object; you do not need to produce page Markdown first.

Use the image recognition API example and replace Text Recognition: with:

Extract the "store_name", "amount". Format the output as a JSON object with keys: "store_name", "amount". If an item is not in the image, use "###".

Replace both field lists with your own field names (Chinese or English). The response is model-generated text: parse the JSON and check fields and values before using it downstream.

Agent skill

Have a coding agent follow the skill to set up the environment, download the model, and parse a first document:

Read and execute https://github.com/OpenBMB/MiniCPM-OCR/blob/main/docs/SKILL_en.md

Fine-tuning

LLaMA-Factory · ms-swift — data preparation, full-parameter SFT with the multimodal projector frozen, training, and evaluation (French handwritten text lines).

Related checkpoints

Format Hugging Face ModelScope
BF16 (original) (this repo) 🤗 ModelScope
GGUF (llama.cpp) 🤗 ModelScope
AWQ W4A16 🤗 ModelScope
GPTQ W4A16 🤗 ModelScope
DSpark draft (BF16) 🤗 ModelScope
DSpark draft (GGUF) 🤗 ModelScope

DSpark requires a matching main and draft model from the same release — do not mix draft weights with a different main checkpoint. See DSpark acceleration.

For OCR quality assessment (auto-accept, human-review routing, best-of-N across models), see MiniCPM-OCR Jev.

FAQ

Installation, model downloads, GPU memory, input formats, and unexpected outputs: FAQ.

License

Model weights, code, and documentation are released under the Apache License 2.0.

译自 OpenBMB · HF · 录于 二〇二六年十月二十七日