百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
M

MonkeyOCR

> 编程语言
开源

基于 LMM 的轻量级文档解析模型

6.6K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

基于 LMM 的轻量级文档解析模型

> **[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
## News > [!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](https://github.com/Yuliang-Liu/MonkeyOCRv2)** · [Paper](https://arxiv.org/abs/2607.11562) · [Demo](http://vlrlabmonkey.xyz:8891/) * ```2026.07.12 ``` MonkeyOCR is accepted by SCIENCE CHINA Information Sciences. * ```2026.04.01 ``` dots.mocr achieves the best open-source score on [MDPBench](https://arxiv.org/pdf/2603.28130), a 17-language document parsing benchmark! * ```2026.03.15 ``` We release [dots.mocr](https://arxiv.org/pdf/2603.13032) Multimodal OCR: Parse Anything from Documents. * ```2026.01.30 ``` We release [MonkeyDoc](https://www.modelscope.cn/datasets/zenosai/MonkeyDoc) and provide the necessary details of our data generation pipeline. * ```2025.11.14 ``` We release [MonkeyOCR-v1.5](https://arxiv.org/abs/2511.10390) Technical Report, achieving the best document parsing performance to date. [Demo](https://aiwrite.wps.cn/pdf/parse/web/). * ```2025.07.10 ``` We release [MonkeyOCR-pro-1.2B](https://huggingface.co/echo840/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](https://huggingface.co/models?sort=trending) #2. * ```2025.06.05 ``` We release [MonkeyOCR](https://huggingface.co/echo840/MonkeyOCR), an English and Chinese documents parsing model. ## Introduction 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. 1. MonkeyOCR-pro-1.2B surpasses MonkeyOCR-3B by 7.4% on Chinese documents. 2. MonkeyOCR-pro-1.2B delivers approximately a 36% speed improvement over MonkeyOCR-pro-3B, with approximately 1.6% drop in performance. 3. On olmOCR-Bench, MonkeyOCR-pro-1.2B outperforms Nanonets-OCR-3B by 7.3%. 4. On OmniDocBench, MonkeyOCR-pro-3B achieves the best overall performance on both English and Chinese documents, outperforming even closed-source and extra-large open-source VLMs such as Gemini 2.0-Flash, Gemini 2.5-Pro, Qwen2.5-VL-72B, GPT-4o, and InternVL3-78B. See detailed results below. ### Comparing MonkeyOCR with closed-source and extra large open-source VLMs.

## Inference Speed (Pages/s) on Different GPUs and [PDF](https://drive.google.com/drive/folders/1geumlJmVY7UUKdr8324sYZ0FHSAElh7m?usp=sharing) Page Counts

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
## VLM OCR Speed (Pages/s) on Different GPUs and [PDF](https://drive.google.com/drive/folders/1geumlJmVY7UUKdr8324sYZ0FHSAElh7m?usp=sharing) Page Counts
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
## Supported Hardware 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](https://github.com/Yuliang-Liu/MonkeyOCR/issues/90), [H200](https://github.com/Yuliang-Liu/MonkeyOCR/issues/151), [L20](https://github.com/Yuliang-Liu/MonkeyOCR/issues/133), [V100](https://github.com/Yuliang-Liu/MonkeyOCR/issues/144), [2080 Ti](https://github.com/Yuliang-Liu/MonkeyOCR/pull/1) and [npu](https://github.com/Yuliang-Liu/MonkeyOCR/pull/226/files). # Quick Start ## Locally Install ### 1. Install MonkeyOCR See the [installation guide](https://github.com/Yuliang-Liu/MonkeyOCR/blob/main/docs/install_cuda_pp.md#install-with-cuda-support) to set up your environment. ### 2. Download Model Weights Download our model from Huggingface. ```python pip install huggingface_hub python tools/download_model.py -n MonkeyOCR-pro-3B # or MonkeyOCR-pro-1.2B, MonkeyOCR ``` You can also download our model from ModelScope. ```python pip install modelscope python tools/download_model.py -t modelscope -n MonkeyOCR-pro-3B # or MonkeyOCR-pro-1.2B, MonkeyOCR ``` ### 3. Inference You can parse a file or a directory containing PDFs or images using the following commands: ```bash # 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 ``` More usage examples ``` … ``` Output Results MonkeyOCR mainly generates three types of output files: 1. **Processed Markdown File** (`your.md`): The final parsed document content in markdown format, containing text, formulas, tables, and other structured elements. 2. **Layout Results** (`your_layout.pdf`): The layout results drawed on origin PDF. 2. **Intermediate Block Results** (`your_middle.json`): A JSON file containing detailed information about all detected blocks, including: - Block coordinates and positions - Block content and type information - Relationship information between blocks These files provide both the final formatted output and detailed intermediate results for further analysis or processing. ### 4. Gradio Demo ```bash python demo/demo_gradio.py ``` Once the demo is running, you can access it at http://localhost:7860. ### 5. Fast API You can start the MonkeyOCR FastAPI service with the following command: ```bash uvicorn api.main:app --port 8000 ``` Once 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`. ## Docker Deployment 1. Navigate to the `docker` directory: ```bash cd docker ``` 2. **Prerequisite:** 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 bash env.sh ``` 3. Build the Docker image: ```bash docker compose build monkeyocr ``` *or* pull our latest official image: ```bash 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: > > ```bash > docker compose build monkeyocr-fix > ``` > > Otherwise, you may encounter the following error: `triton.runtime.errors.OutOfResources: out of resource: shared memory` 4. Run the container with the Gradio demo (accessible on port 7860): ```bash docker compose up monkeyocr-demo ``` Alternatively, start an interactive development environment: ```bash docker compose run --rm monkeyocr-dev ``` 5. Run the FastAPI service (accessible on port 7861): ```bash docker compose up monkeyocr-api ``` Once the API service is running, you can access the API documentation at http://localhost:7861/docs to explore available endpoints. ## Windows Support See the [windows support guide](docs/windows_support.md) for details. ## Quantization This model can be quantized using AWQ. Follow the instructions in the [quantization guide](docs/Quantization.md). ## Benchmark Results 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. ### 1. The end-to-end evaluation results of different tasks.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言