Open-source project
Yuliang-Liu/MonkeyOCRv2 avatar
Yuliang-Liu/MonkeyOCRv2

MonkeyOCRv2: three encoders, one readable parsing row, and a 113 million image corpus

MonkeyOCRv2 Vision Encoder — A Document-Native Visual Backbone

1,670 stars146 forksPythonNOASSERTION

At a glance

What is it?
The repository separates a document-native vision encoder from the parsing models built on top of it, announces training recipes for four tasks, and publishes a corpus that is still short of its own headline figure. The numbers a reader can check sit in a single table row.
Who is it for?
MonkeyOCRv2 suits teams that already run a document stack and want to swap the visual backbone rather than rebuild the pipeline, since the encoder ships as a standalone component and the leaderboard claim comes with a leaderboard link. Treat every published number as self-reported: one parsing row is complete, the headline 83.3 belongs to the row with no per-language detail behind it, and the corpus is public at 104 of its stated 113 million images.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 5 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 22, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • Yuliang-Liu/MonkeyOCRv21,670 ★ · +261
Star history
Repository2026-09-182026-11-22
Yuliang-Liu/MonkeyOCRv21.4k1.7k

261 Stars in the last 65 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Three encoders, one task split, and an ambiguous resolution column

The model zoo lists three vision encoders. MonkeyOCRv2-S pairs a ViT-S backbone with 28M parameters, MonkeyOCRv2-B pairs ViT-B with 113M, and MonkeyOCRv2-AS pairs ViTAEv2-S with 21M. The first two are labelled for Recognition, Parsing and Understanding. Only the AS variant is labelled Detection and Segmentation, which makes the smallest model in the table the only one claiming the two tasks that no parsing model claims. That split matters when assembling a pipeline: the encoder a team reaches for to read documents is not the encoder the project points at for locating text or cutting overlapping lines apart. The pretraining resolution column is printed as 1280*28*28 for S and B and 1760*32*32 for AS, without saying which factor is a patch count and which is a patch edge, so the two cells cannot be compared as written.

The quick start is four keyword arguments and a remote code flag

Loading an encoder takes one constructor call with four keyword arguments. Two of them decide where the weights land: dtype is set to auto and device_map is set to auto. The third is the one worth a decision. trust_remote_code is set to True, which is the flag telling transformers to import and execute Python modules that ship alongside the weights instead of loading tensors and nothing else. Anyone wiring this into a service is running third-party code at import time, so that argument deserves review rather than a copy and paste. The parsing path without a GPU is handled in a separate document, docs/cpu_support.md, and the repository root also carries download_model.py for pulling weights through the project's own script instead of a model host.

python
from transformers import AutoModel

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

The identifier in that snippet is the 113M ViT-B variant, so the largest of the three encoders is the one the quick start demonstrates.

The parsing table ends one cell into the MonkeyOCRv2-B-Parsing row

Exactly one parsing model has a complete row of numbers. MonkeyOCRv2-S-Parsing is listed at 0.6B total parameters, split into a 0.03B ViT and a 0.6B LLM. That 0.03B visual tower is the 28M MonkeyOCRv2-S encoder from the first table expressed in other units, so the two tables are describing the same checkpoint and agreeing on its size. Its scores read 82.5 overall, 87.9 on digital-born documents and 80.7 on photographed ones, with 83.2 across the Latin languages and 81.7 across the rest. The MonkeyOCRv2-B-Parsing row carries 0.7B total and a 0.1B ViT, then stops. Its remaining cells have no printed value, which covers every per-language number a reader would use to compare it against something else.

The headline score sits in the row that stops

The news log claims a first-place finish among evaluated open-source models on the MDPBench leaderboard with 83.3 overall across 17 languages, and that figure belongs to MonkeyOCRv2-B-Parsing. The only parsing row readable end to end reports 82.5. The gap between the advertised number and the readable one is narrow, but the advertised number belongs to the row with no per-language breakdown behind it. An up to twofold inference gain is claimed for MonkeyOCRv2-B-Parsing-DFlash under vLLM serving, with no batch size, precision or hardware attached. The project shows 1,512 stars and 140 forks on GitHub with zero open issues, which at that size points to a quiet tracker or a closed one. There are no GitHub releases either, so nothing is tagged to compare against.

MonkeyDoc v2 asks for 11 TB and has published 104 of its 113 million images

The pretraining corpus is described as 113 million document images across 17 languages, and the release is described as still in progress: 52 million synthetic samples and 52 million real-world samples have gone out so far. Those two halves add to 104 million, which leaves roughly nine million images inside the headline total belonging to neither released figure. The download path runs through the ModelScope client rather than a git repository.

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

After processing and compression the full dataset is said to occupy about 10 TB, and the guidance is to keep at least 11 TB free before starting, a two terabyte margin over the stated post-compression size. For anyone budgeting a machine, that margin is the difference between starting and restarting.

Task folders at the root, and one of them spelled asserts

The repository is organised as task directories: detection, forensics, formula, parsing, recognition, understanding and vision, alongside docs, images_test, asserts and download_model.py. One root entry is spelled asserts, which is not the assets spelling an image directory would normally carry, so a search for assets under the conventional name finds nothing. Two of the evaluated capabilities have no directory of their own. Overlapping text segmentation and document tampering detection are both named as evaluated tasks, and segmentation appears here only as a task label on the AS encoder. forensics is the single root entry pointing at tampering detection. Training and evaluation instructions for Recognition, Detection, Overlapping Text Segmentation and Formula were announced as one release, and those four do map to folders that exist.

Adoption runs through a third-party PDF parser and two model hosts

None of this is packaged for pip. The parsing models are reached through a HuggingFace collection and a ModelScope mirror, the corpus is a ModelScope dataset, the project page sits at yuliang-liu.github.io/MonkeyOCRv2, and the paper is on arXiv at 2607.11562. A live demo server is linked from the header at vlrlabmonkey.xyz on port 8891. The clearest evidence of downstream use is not a release but a third-party integration: RAGFlow added MonkeyOCRv2-Parsing as a PDF parser, credited in the news entry dated 2026.09.07, and CPU support for the parsing path arrived three weeks earlier. What none of that supplies is a versioning story. With no GitHub releases and no tags quoted, a deployment pins itself to whatever the two model hosts serve that week.

Editorial conclusion

MonkeyOCRv2 suits teams that already run a document stack and want to swap the visual backbone rather than rebuild the pipeline, since the encoder ships as a standalone component and the leaderboard claim comes with a leaderboard link. Treat every published number as self-reported: one parsing row is complete, the headline 83.3 belongs to the row with no per-language detail behind it, and the corpus is public at 104 of its stated 113 million images. Check three things before committing. Settle the license, because the repository field says NOASSERTION while a LICENSE file sits at the root. Read the code that ships inside the checkpoint, because loading it requires trust_remote_code. And price the storage, because 11 terabytes is a standing cost rather than a one-time download.

Frequently asked questions

Is MonkeyOCRv2 a document parsing model or only a vision encoder?

Both, as separate artifacts. The repository publishes three standalone vision encoders meant to sit inside other OCR and document AI systems as a visual backbone, and separately publishes parsing models that pair an encoder with an LLM. The parsing scores belong to the paired models, not to an encoder on its own.

What license does MonkeyOCRv2 use?

It is not stated consistently. The license field on the repository reads NOASSERTION while a LICENSE file sits at the root of the tree, so the two disagree about what applies and neither states a named license in plain text.

How much disk space does the MonkeyDoc v2 dataset need?

About 10 TB after processing and compression, and the guidance is to have at least 11 TB of free space before starting the download so there is room left over during the process.

Can MonkeyOCRv2-Parsing run on a machine with no GPU?

Yes. CPU support for the parsing path was added and the instructions live in docs/cpu_support.md in this repository. The quick start snippet itself only shows the encoder constructor, not the parser.

Which languages does MonkeyOCRv2 report results for?

17 language columns, matching the 17 languages of the pretraining corpus. The Latin group covers DE, EN, ES, FR, ID, IT, NL, PT and VI, and the non-Latin group covers AR, HI, JP, KO, RU, TH, ZH and ZH-T.

Official sources

  1. Issues
  2. Project website
  3. README
  4. Yuliang-Liu/MonkeyOCRv2 on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/yuliang-liu-monkeyocrv2.svg)](https://hysenlabs.com/projects/yuliang-liu-monkeyocrv2)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/yuliang-liu-monkeyocrv2.svg)](https://hysenlabs.com/projects/yuliang-liu-monkeyocrv2)

Was this useful?