MiniCPM logo
Usage Guide
| π Free API
Try it online for free, then call the API from your own code.
Playground (CN / Global )
API docs (CN / Global )
| π€ Agent Skill
One prompt: the agent installs it and parses your first document.
SKILL.md
| π» Self-hosting
vLLM / SGLang / llama.cpp / Ollama, plus an official Docker image. Data stays on your side.
Deployment guide
| π± Mobile App
On-device and offline. Document parsing is iOS-only for now.
iOS Demo
Demo (CN / Global ) Β· GitHub Β· SDK usage Β· DSpark Β· Discord | δΈζ
MiniCPM-OCR 1.0 DSpark β GGUF#
GGUF build of the DSpark draft head for MiniCPM-OCR 1.0 . A draft model, not a standalone OCR model β pair it with the matching main checkpoint.
Files#
File Size dspark-MiniCPM-OCR-1_0-F16.gguf0.606 GB dspark-MiniCPM-OCR-1_0-Q8_0.gguf0.327 GB dspark-MiniCPM-OCR-1_0-Q6_K.gguf0.255 GB dspark-MiniCPM-OCR-1_0-Q5_K_M.gguf0.233 GB dspark-MiniCPM-OCR-1_0-Q5_K_S.gguf0.232 GB dspark-MiniCPM-OCR-1_0-Q5_1.gguf0.243 GB dspark-MiniCPM-OCR-1_0-Q5_0.gguf0.232 GB dspark-MiniCPM-OCR-1_0-Q4_K_M.gguf0.211 GB dspark-MiniCPM-OCR-1_0-Q4_K_S.gguf0.209 GB dspark-MiniCPM-OCR-1_0-Q4_1.gguf0.220 GB dspark-MiniCPM-OCR-1_0-Q4_0.gguf0.209 GB
Use the main model's projector (mmproj-model-f16-4x.gguf from MiniCPM-OCR-1.0-gguf ); this repository contains only the draft.
Parsing pipeline#
MiniCPM-OCR 1.0 parses full documents as a two-stage pipeline orchestrated by the minicpm-ocr SDK . The two stages use separate models, run in separate environments, and may run on different machines:
Stage 1 β Layout detection (SDK environment). The PP-DocLayoutV3 layout model detects document regions β text, tables, formulas, charts, seals β and determines reading order; the SDK crops each region. It runs locally inside the SDK environment and requires PaddlePaddle / PaddleX.Stage 2 β Region recognition (inference service). The SDK sends each cropped region over HTTP to a MiniCPM-OCR 1.0 inference service β served by vLLM, SGLang, llama.cpp, or Ollama β with a prompt matching the region type, then assembles the recognized content into the final Markdown / JSON in reading order.
Image: Parsing pipeline: in the minicpm-ocr SDK environment, the PP-DocLayoutV3 layout model detects and crops document regions; each cropped region is sent over HTTP to a separate recognition service running MiniCPM-OCR 1.0 (vLLM, SGLang, llama.cpp, or Ollama); the SDK then assembles the recognized text, tables, formulas, charts, and seals into Markdown and JSON in reading order.
See the model guide for more on architecture, parsing workflow, deployment options, and benchmark breakdowns.
Usage#
llama-cli \
-m MiniCPM-OCR-1_0-Q8_0.gguf \
--mmproj mmproj-model-f16-4x.gguf \
-md dspark-MiniCPM-OCR-1_0-Q8_0.gguf \
--spec-type draft-dspark \
--image page.png -p "Text Recognition:" \
--jinja -ngl 99 -ngld 99 -fa on Copy
-md is the draft model and --spec-type draft-dspark enables the draft; -ngld offloads draft layers to GPU.
llama-mtmd-cli does not accept a draft model. Use llama-cli or llama-server when enabling DSpark with multimodal input.
Each tier carries the absolute target token IDs in its d2t tensor (the safetensors export stores them delta-encoded).
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 .