Baidu releases Unlimited OCR 2, an open model that reads hundreds of pages in one go
It turns full books and long reports into structured text, so anyone with a GPU can process documents that usually trip up AI tools.

What you could do with it
- A researcher could process hundreds of pages from a book or report in a single request and get structured text, tables, and formulas back using Unlimited OCR 2 1.
- A business could run the MIT-licensed model on its own GPU hardware to parse long legal filings or reports without paying for cloud inference 1.
- A developer could fine-tune or integrate the open-source model into a document pipeline since both weights and code are freely available on GitHub 1.

Figure: Wei et al., arXiv:2510.18234, CC BY 4.0
What makes it different
Unlimited OCR 2 is a 3.34-billion-parameter vision-language model 1. It takes ordered images of pages and outputs text, tables, formulas, figures, headings and reading order .
The trick that makes it work is a technique called SR-SWA, short for Sparse Reference Sliding Window Attention 1. Normally, when an AI processes a long sequence, the work grows quadratically — twice the length means roughly four times the effort . At 273 image tokens per page, a 100-page document adds 27,300 tokens before the model even starts writing output .
SR-SWA instead compresses attention into a fixed set of 512 working reference tokens 1. A 128-token local window is paired with a selection of the top 16 out of 32-token blocks . This keeps per-step decoding cost and memory nearly flat as the document grows . Image encoding and total runtime still rise with page count, but the bottleneck of attention is capped .
The model uses a SAM ViT-B and CLIP-L encoder feeding a 12-layer mixture-of-experts decoder, where each token routes to 6 of 64 experts 1. Baidu does not disclose how many parameters are active at once .
How well it scores
On MPDocBench, which tests dozens of pages per document, Unlimited OCR 2 scores 84.6 1. Qwen3.8-Max follows at 78.3 .
On MarathonDocBench, which tests hundreds of pages, it scores 77.1 — compared with 33.7 for the next model, Kimi-K3, and 28.6 for Gemini-3.8-Flash 1. Qwen3.8-Max falls from 78.3 on short documents to 22.9 on long ones; Unlimited OCR 2 drops only 7.5 points . Its predecessor, Unlimited-OCR, scores 0.0 on MarathonDocBench .
Sub-scores on MarathonDocBench include 89.6 for text, 87.9 for formulas, 85.3 for reading order, 74.8 for tables and 48.2 for heading hierarchy — the weakest area 1. All numbers are self-reported by Baidu and appear only in a chart image . A public version of MarathonDocBench was not found .
how well the model parses long documents into structured text. Higher is better. Numbers: Baidu (self-reported). Chart drawn by Herald of AI.

Figure: Wei et al., arXiv:2510.18234, CC BY 4.0
How to run it
Weights are released under the MIT license with code on GitHub 1. The model card recommends Hugging Face Transformers for quick tests and SGLang for production serving . Loading requires setting `trust_remote_code=True`, which runs Python code from the repository .
In serving mode, Baidu schedules 10 pages per window and reuses the previous window's key-value cache tail 1. Smaller windows reduce peak memory but weaken cross-page merging . Baidu cautions that using the default bias configuration may cause the system to request a 462 MiB memory allocation and exhaust available memory . Tests were run on a single NVIDIA A800-80GB GPU in BF16, with weights totalling about 6.7 GB .
Comparison with similar open models
Unlimited OCR 2 joins other open OCR models including Baidu's own Unlimited-OCR, DeepSeek-OCR-2 and Baidu PaddlePaddle's PaddleOCR-VL-1.6 1. Among them, only Unlimited OCR 2 and Unlimited-OCR support a dedicated multi-page mode; DeepSeek-OCR-2 and PaddleOCR-VL-1.6 do not report long-document benchmarks .
This story reports on a trend for information only. It is not advice or encouragement to do any of it.
Key facts
- 3.34B parameters, runs on one NVIDIA A800 GPU in BF16
- 77.1 on MarathonDocBench (hundreds of pages), vs 33.7 for Kimi-K3
- SR-SWA keeps per-step attention cost nearly flat as documents grow
- MIT-licensed, code on GitHub
- Heading hierarchy is the weakest sub-score at 48.2
Sources
- Baidu Open-Sources Unlimited OCR 2 for Hundred-Page Document Parsing — marktechpost.com