Model reference · open weights

MonkeyOCRv2-B-Parsing

LLMs zenosai · community Vision + text 1 build Open weights 1k dl/mo

MonkeyOCRv2-B-Parsing is an open-weight language model from zenosai. MonkeyOCRv2-B-Parsing (BF16) weighs 2.0 GB; the smallest configuration that runs it is RTX 3060 12 GB.

What it is

Released byzenosai
TypeLanguage models
TaskVision + text
Parameters (lead)878M
Context40,960 tokens
Runs withtransformers
Released2026-07-11
Popularity1k downloads / month
Weights2.0 GB (MonkeyOCRv2-B-Parsing (BF16), file size)
LicenceOpen weights

What it runs on

Memory and cards for MonkeyOCRv2-B-Parsing (BF16)

Weights 2.0 GB (file size) · KV cache 115 MB per 1,000 tokens of context, at 16 bits (vLLM's default for this build; an 8-bit cache halves it) · runtime overhead from 1.9 GB on a small card · context up to 40,960 tokens.

CardRequests at once
8K tokens each
Requests at once
32K tokens each
Longest single
request
Counted
memory
RTX 3060 12 GB82all 40K11.6 GB
RTX 4060 Ti 16 GB123all 40K15.4 GB
RTX 3090 24 GB205all 40K23.4 GB
RTX 4090 24 GB205all 40K23.4 GB
RTX 5090 32 GB287all 40K31.0 GB
L40S 48 GB4210all 40K44.0 GB
A100 80 GB7919all 40K78.2 GB
H100 80 GB7418all 40K78.1 GB
RTX PRO 6000 Blackwell 96 GB9122all 40K93.8 GB
DGX Spark (GB10) 128 GB unified10526all 40K107 GB
H200 141 GB13834all 40K138 GB
B200 180 GB17844all 40K176 GB
Memory needed at each load
Requests at once8K tokens each32K tokens each
14.9 GB7.7 GB
58.7 GB22.8 GB
811.5 GB34.0 GB
1619.0 GB64.1 GB
3234.0 GB124 GB
6464.1 GB244 GB

On one card, with vLLM's small-card settings (2,048 tokens a step). Cards of 70 GB and more reserve more per request and more overhead — each row above uses its own card's settings.

Estimates, not measurements, checked against published vLLM startup logs. The weights are the build's file size; the cache is calculated from its config (grouped-query attention); the overhead is an estimate of vLLM's own memory with that card's default settings. "Requests at once" is how many requests of that length vLLM admits — its reservation at full length, with --max-model-len set to that length; requests that stay shorter fit more. "Longest single request" is the most one request can hold there: below the model's maximum, vLLM starts only with --max-model-len set at or under it. "Counted memory" is vLLM's default 92 % of what CUDA reports for the card (the DGX Spark: about 100 GiB of its shared 128 GB). Assumes vLLM 0.10 or later.

From the model card

What zenosai says about MonkeyOCRv2-B-Parsing

Read the full model card

News

  • 2026.09.07 🚀 MonkeyOCRv2-Parsing is now supported by RAGFlow as a PDF parser. Thanks to the RAGFlow team and community for the support!
  • 2026.08.22 🖥️ We now support running MonkeyOCRv2-Parsing on CPU. See the CPU support instructions.
  • 2026.08.17 ⚡ Releasing training and evaluation instructions for Recognition, Detection, Overlapping Text Segmentation and Formula.
  • 2026.07.24 ⚡ We released MonkeyOCRv2-B-Parsing-DFlash, enabling vLLM serving with DFlash for up to 2× faster inference.
  • 2026.07.22 🏆 MonkeyOCRv2-B-Parsing ranks #1 among evaluated open-source models on the official MDPBench Leaderboard, achieving 83.3 overall across 17 languages, including digital-born and photographed documents.
  • 2026.07.21 📦 We release MonkeyDoc v2, an open multilingual corpus for document-oriented pretraining. We hope it can serve as a shared data foundation for more transparent, reproducible, and fair comparisons in Document AI.
  • 2026.07.14 🚀 We release MonkeyOCRv2, including MonkeyOCRv2 vision encoder, MonkeyOCRv2-Parsing for multilingual document parsing, MonkeyOCRv2-Und for efficient document understanding.

Use MonkeyOCRv2 as a Vision Backbone

MonkeyOCRv2 is released as a standalone, document-native vision encoder. It can be integrated into different OCR and document AI systems as a visual backbone.

The current release has been evaluated on document parsing, document understanding, text recognition, formula recognition, text detection, document tampering detection, and overlapping-text segmentation.

Beyond these evaluated tasks, the encoder may also be useful for text-rich scenarios such as scientific papers, historical documents, medical reports, charts and tables, and remote-sensing maps or reports. We welcome community exploration of these directions.

from transformers import AutoModel

encoder = AutoModel.from_pretrained(
    "zenosai/MonkeyOCRv2-B",
    trust_remote_code=True,
    dtype="auto",
    device_map="auto",
)

See the Vision Encoder Quick Start for installation and feature-extraction examples. If you adapt MonkeyOCRv2 to a new task or domain, feel free to open an issue or pull request and share the results.

MonkeyDoc v2

MonkeyDoc v2 is currently the largest document image pre-training image-text pair dataset, comprising 113 million document images across 17 languages. The open-sourcing of MonkeyDoc v2 is still underway. So far, we have released 52 million synthetic samples and 52 million real-world samples. You can download the full dataset as follows:

pip install modelscope
modelscope download --dataset zenosai/MonkeyDocv2 --local_dir ./MonkeyDocv2

After processing and compression, downloading the dataset currently requires approximately 10 TB of disk space. We recommend having at least 11 TB of available storage before starting the download to ensure sufficient space throughout the process.

Model Zoo

1. Vision Encoder
2. Document Parsing Model
3. Document Understanding Model

Quick Start

What trust_remote_code=True loads is listed in docs/trust_remote_code.md.

Vision Encoder

1. Install

Install transformers and flash attention:

conda create -n MonkeyOCRv2 python=3.11
conda activate MonkeyOCRv2
pip install torch==2.8.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu126
pip install transformers==4.57.1
pip install accelerate==1.11.0
pip install qwen_vl_utils==0.0.14
pip install flash-attn==2.8.3 --no-build-isolation
2. Download Model Weights

Download our model from Huggingface.

python download_model.py -n MonkeyOCRv2-B # or MonkeyOCRv2-S / MonkeyOCRv2-AS

You can also download our model from ModelScope.

pip install modelscope
python download_model.py -t modelscope -n MonkeyOCRv2-B # or MonkeyOCRv2-S / MonkeyOCRv2-AS
3. Extract Image Feature
cd vision
# For MonkeyOCRv2-B and MonkeyOCRv2-S
python extract_feature.py -m ../model_weight/MonkeyOCRv2-B -i ../images_test/ar.JPEG
# For MonkeyOCRv2-AS
python extract_feature_vitae.py -m ../model_weight/MonkeyOCRv2-AS -i ../images_test/ar.JPEG

Document Parsing

1. Install

Install vLLM following its official guide:

conda create -n MonkeyOCRv2Parsing python=3.11
conda activate MonkeyOCRv2Parsing
pip install uv
uv pip install vllm --extra-index-url https://wheels.vllm.ai/0.25.1/cu129 --extra-index-url https://download.pytorch.org/whl/cu129 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install -r parsing/requirements.txt

To use DFlash for faster inference, vLLM 0.25.1 is required, which depends on CUDA 12.9 or later.

If your system does not support CUDA 12.9, you can instead install vLLM 0.11.2 (without DFlash support)

Quoted from the model card on Hugging Face — the full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms