Baidu Unlimited-OCR-2 Explained: Open-Source Document Parsing for Hundreds of Pages in One Pass
Baidu's open 3B document parser reads hundreds of pages in one pass: 84.6 on MPDocBench, 77.1 on MarathonDocBench (vendor-reported, preliminary).
1. What it is: a second-generation long-document parser, open-sourced two days ago
2. The SR-SWA mechanism: every decoding step looks at a fixed 512 reference tokens
3. Our own math: 3,600 pages are 7.5 windows, so “unbounded” is about mechanism, not window size
4. Benchmarks: all vendor-reported, marked preliminary, no independent reproduction
5. Selection guide: 30–300 pages is the sweet spot; under 30 pages it is unnecessary; at thousands of pages, budget total time
6. Sources and disclaimer
Side by side: Unlimited-OCR-2 vs page-by-page stitching vs general vision models vs generation one
| Approach | Pages per pass | Cross-page context | Per-step cost vs pages | License and access |
|---|---|---|---|---|
| Unlimited-OCR-2 (Baidu) | Hundreds of pages; 3,600+ in demo | Kept, single input | Nearly flat (fixed 512 reference tokens) | MIT, open on GitHub and Hugging Face |
| Unlimited-OCR, generation one | Dozens of consecutive pages | Kept within R-SWA reference window | Grows with reference window | MIT, open |
| Page-by-page OCR, stitched | Unlimited (batched) | Breaks at joins: cross-page tables, footnotes, references often lost | Fixed per page, plus stitching cost | Mostly traditional OCR toolchains |
| General vision model, whole book as input | Limited by context window | Kept inside window, truncated beyond | KV cache and per-step cost grow with pages | Mostly closed API or large weights |
MPDocBench overall scores (vendor-reported, preliminary)
数据来源:Sources: Baidu's reported benchmark figures (consistent across multiple reports, 2026-10-29); no independent reproduction yet, for order-of-magnitude reference only
Frequently Asked Questions
Can Unlimited-OCR-2 really read an “unbounded” number of pages?
Mechanically yes, cost-wise no. SR-SWA fixes each decoding step's reference set at 512 tokens, so per-step latency and memory stop growing with page count — the demo passed 3,600 pages in one run. But image encoding still happens page by page, so total runtime grows with pages, and overall memory does not stand still either. Read it as “no longer capped by page count per step,” not as “pages are free.”
What hardware does local Unlimited-OCR-2 need?
About 6.2GB of BF16 weights; official testing used a single NVIDIA A800 with 80GB. Large-VRAM consumer cards can run it by the weight math, with room left for activations and cache. Transformers fits quick experiments, SGLang is the officially recommended serving route, and community vLLM support exists; no quantized build is available yet, and CPU inference gets much slower on long documents.
Are the 84.6 and 77.1 scores trustworthy?
Only as reference for now. Both figures are vendor-reported, marked preliminary, with no independent reproduction; MarathonDocBench is also Baidu's own new benchmark, so the home-exam caveat applies. Use them to judge direction and magnitude, not to argue a procurement case, until independent evaluations appear.
What changed from generation one?
The mechanism. Generation one used R-SWA reference sliding windows and handled dozens of consecutive pages, scoring 0 on hundred-page MarathonDocBench. Generation two switches to SR-SWA sparse references, compressing the reference set into a fixed 512 tokens, pushing the page ceiling from dozens to the 3,600-plus-page demo and lifting MPDocBench to 84.6.