A lightweight LMM-based Document Parsing Model
[SCIENCE CHINA Information Science] MonkeyOCR: Document Parsing with a Structure-Recognition-Relation Triplet Paradigm
Zhang Li, Yuliang Liu, Qiang Liu, Zhiyin Ma, Ziyang Zhang, Shuo Zhang, Zidun Guo, Jiarui Zhang, Xinyu Wang, Xiang Bai
[!IMPORTANT] MonkeyOCRv2 is here (July 2026) — a document-native vision backbone plus a 0.7B parser that is the new open-source SOTA on multilingual document parsing (17 languages), now released under Apache-2.0. Yuliang-Liu/MonkeyOCRv2 · Paper · Demo
2026.07.12 MonkeyOCR is accepted by SCIENCE CHINA Information Sciences.2026.04.01 dots.mocr achieves the best open-source score on MDPBench, a 17-language document parsing benchmark!2026.03.15 We release dots.mocr Multimodal OCR: Parse Anything from Documents.2026.01.30 We release MonkeyDoc and provide the necessary details of our data generation pipeline.2025.11.14 We release MonkeyOCR-v1.5 Technical Report, achieving the best document parsing performance to date. Demo.2025.07.10 We release MonkeyOCR-pro-1.2B, a leaner and faster version model that outperforms our previous 3B version in accuracy, speed, and efficiency.2025.06.12 The model’s trending on Hugging Face #2.2025.06.05 We release MonkeyOCR, an English and Chinese documents parsing model.MonkeyOCR adopts a Structure-Recognition-Relation (SRR) triplet paradigm, which simplifies the multi-tool pipeline of modular approaches while avoiding the inefficiency of using large multimodal models for full-page document processing.
See detailed results below.
| Model | GPU | 50 Pages | 100 Pages | 300 Pages | 500 Pages | 1000 Pages |
|---|---|---|---|---|---|---|
| MonkeyOCR-pro-3B | 3090 | 0.492 | 0.484 | 0.497 | 0.492 | 0.496 |
| A6000 | 0.585 | 0.587 | 0.609 | 0.598 | 0.608 | |
| H800 | 0.923 | 0.768 | 0.897 | 0.930 | 0.891 | |
| 4090 | 0.972 | 0.969 | 1.006 | 0.986 | 1.006 | |
| MonkeyOCR-pro-1.2B | 3090 | 0.615 | 0.660 | 0.677 | 0.687 | 0.683 |
| A6000 | 0.709 | 0.786 | 0.825 | 0.829 | 0.825 | |
| H800 | 0.965 | 1.082 | 1.101 | 1.145 | 1.015 | |
| 4090 | 1.194 | 1.314 | 1.436 | 1.442 | 1.434 |
| Model | GPU | 50 Pages | 100 Pages | 300 Pages | 500 Pages | 1000 Pages |
|---|---|---|---|---|---|---|
| MonkeyOCR-pro-3B | 3090 | 0.705 | 0.680 | 0.711 | 0.700 | 0.724 |
| A6000 | 0.885 | 0.860 | 0.915 | 0.892 | 0.934 | |
| H800 | 1.371 | 1.135 | 1.339 | 1.433 | 1.509 | |
| 4090 | 1.321 | 1.300 | 1.384 | 1.343 | 1.410 | |
| MonkeyOCR-pro-1.2B | 3090 | 0.919 | 1.086 | 1.166 | 1.182 | 1.199 |
| A6000 | 1.177 | 1.361 | 1.506 | 1.525 | 1.569 | |
| H800 | 1.466 | 1.719 | 1.763 | 1.875 | 1.650 | |
| 4090 | 1.759 | 1.987 | 2.260 | 2.345 | 2.415 |
Due to the limited types of GPUs available to us, we may not be able to provide highly accurate hardware specifications. We've tested the model on GPUs such as the 3090, 4090, A6000, H800, A100, and even the 4060 with 8GB of VRAM (suitable for deploying quantized 3B model and 1.2B model). We are very grateful for the feedback and contributions from the open-source community, who have also successfully run the model on 50-series GPUs, H200, L20, V100, 2080 Ti and npu.
See the installation guide to set up your environment.
Download our model from Huggingface.
pip install huggingface_hub
python tools/download_model.py -n MonkeyOCR-pro-3B # or MonkeyOCR-pro-1.2B, MonkeyOCRYou can also download our model from ModelScope.
pip install modelscope
python tools/download_model.py -t modelscope -n MonkeyOCR-pro-3B # or MonkeyOCR-pro-1.2B, MonkeyOCRYou can parse a file or a directory containing PDFs or images using the following commands:
# Replace input_path with the path to a PDF or image or directory
# End-to-end parsing
python parse.py input_path
# Parse files in a dir with specific group page num
python parse.py input_path -g 20
# Single-task recognition (outputs markdown only)
python parse.py input_path -t text/formula/table
# Parse PDFs in input_path and split results by pages
python parse.py input_path -s
# Specify output directory and model config file
python parse.py input_path -o ./output -c config.yaml…MonkeyOCR mainly generates three types of output files:
your.md): The final parsed document content in markdown format, containing text, formulas, tables, and other structured elements.your_layout.pdf): The layout results drawed on origin PDF.your_middle.json): A JSON file containing detailed information about all detected blocks, including:These files provide both the final formatted output and detailed intermediate results for further analysis or processing.
python demo/demo_gradio.pyOnce the demo is running, you can access it at http://localhost:7860.
You can start the MonkeyOCR FastAPI service with the following command:
uvicorn api.main:app --port 8000Once the API service is running, you can access the API documentation at http://localhost:8000/docs to explore available endpoints.
[!TIP] To improve API concurrency performance, consider configuring the inference backend as
vllm_async.
Navigate to the docker directory:
cd dockerPrerequisite: Ensure NVIDIA GPU support is available in Docker (via nvidia-docker2).
If GPU support is not enabled, run the following to set up the environment:
bash env.shBuild the Docker image:
docker compose build monkeyocror pull our latest official image:
docker pull zenosai/monkeyocr:260304[!IMPORTANT]
If your GPU is from the 20/30/40-series, V100, L20/L40 or similar, please build the patched Docker image for LMDeploy compatibility:
docker compose build monkeyocr-fixOtherwise, you may encounter the following error:
triton.runtime.errors.OutOfResources: out of resource: shared memory
Run the container with the Gradio demo (accessible on port 7860):
docker compose up monkeyocr-demoAlternatively, start an interactive development environment:
docker compose run --rm monkeyocr-devRun the FastAPI service (accessible on port 7861):
docker compose up monkeyocr-apiOnce the API service is running, you can access the API documentation at http://localhost:7861/docs to explore available endpoints.
See the windows support guide for details.
This model can be quantized using AWQ. Follow the instructions in the quantization guide.
Here are the evaluation results of our model on OmniDocBench. MonkeyOCR-3B uses DocLayoutYOLO as the structure detection model, while MonkeyOCR-3B* uses our trained structure detection model with improved Chinese performance.
No open issues yet, or sync has not completed.