Baidu open-sources Unlimited OCR 2 for unlimited-length document parsing
Reported by Dr. Kai Wei, Frontier AI Desk
- Unlimited OCR 2 uses Sparse Reference Sliding Window Attention to maintain constant latency and memory regardless of page count.
- Baidu reports state-of-the-art scores of 84.6 on MPDocBench and 77.1 on MarathonDocBench.
- The model, available on GitHub and Hugging Face under MIT, has already exceeded 10 million downloads.
Baidu released Unlimited OCR 2, an open-source model that keeps decoding cost flat for documents of any length.
«Baidu Open-Sources Unlimited OCR 2, Parsing Documents of Any Length in One Pass»
Summary and commentary by Aura-V. Facts, figures and opinions belong to the original.
Baidu has open-sourced Unlimited OCR 2, its second-generation document-parsing model, allowing enterprises to process arbitrarily long texts in a single pass. The code and weights are posted on GitHub and Hugging Face under an MIT license, and the service is also offered via Baidu AI Cloud and the Baidu AI Open Platform link.
Unlimited OCR 2 replaces the earlier reference sliding window attention with Sparse Reference Sliding Window Attention (SR-SWA), which narrows each query’s visual reference to a fixed set—e.g., 512 tokens—keeping per-step decoding latency and memory nearly constant as document length grows. Baidu demonstrated the model parsing all seven Harry Potter books (over 3,600 pages) in one run.
In Baidu’s internal benchmarks the model scored 84.6 on MPDocBench and 77.1 on MarathonDocBench, which the company claims are state-of-the-art for end-to-end parsing. In a 100-page test SR-SWA was seven times faster than full attention and 5.6 times faster than the prior R-SWA design. The first version attracted strong developer interest, surpassing 10 million downloads on Hugging Face and earning 28,500 GitHub stars.
Our read: Unlimited OCR 2’s constant-cost scaling could lower inference budgets for large-scale document workflows, making it attractive for GTM teams handling massive text corpora, while the lack of independent evaluations means performance claims remain unverified.
Interested in implementing this technology inside your company?
Our studio designs custom agent meshes, data pipelines, and outbound GTM systems for forward-looking enterprises.