雷峰网 AISource publication

The OCR 3.0 era has arrived! Wenxin Unlimited OCR 2 released as open source, bringing 'page-count freedom' to ultra-long document parsing

On October 27, Baidu released and open-sourced Wenxin Unlimited OCR 2, achieving arbitrary-page-count document parsing for the first time worldwide, pushing OCR's processing limit from dozens of pages toward 'unlimited', and reaching state-of-the-art (SOTA) performance.

On October 27, Baidu released and open-sourced Wenxin Unlimited OCR 2, achieving arbitrary-page-count document parsing for the first time worldwide, pushing OCR's processing limit from dozens of pages toward 'unlimited', and reaching state-of-the-art (SOTA) performance. Real-world tests show that the model can parse all 7 works of the Harry Potter series in one pass, totaling more than 3600 pages, maintaining high accuracy and processing efficiency even as document length increases dramatically, driving document parsing technology into the OCR 3.0 era.



Public benchmark tests show that on MPDocBench, which targets multi-page document parsing, and MarathonDocBench, which specifically evaluates parsing capability on ultra-long documents of a hundred pages, Wenxin Unlimited OCR 2 achieved composite scores of 84.6 and 77.1 respectively, reaching end-to-end performance SOTA and significantly outperforming models such as Qwen 3.8-Max, Gemini-3.8-Flash, GLM-5.3-Flash, and DeepSeek-4.1-Flash.





This breakthrough is thanks to the Sparse Reference Sliding Window Attention (SR-SWA) mechanism proposed by Wenxin Unlimited OCR 2. The mechanism draws on the process by which humans transcribe books—typically focusing on the current page and only looking back at relevant content when needing to verify earlier text or find cross-page information, rather than repeatedly leafing through the entire book.



SR-SWA introduces this idea into the model's attention computation. Specifically, the Page Gate first narrows each query's visual reference scope from the entire document down to relevant pages, while modeling cross-page positional relationships; it then introduces the highest-scoring visual Token Buckets to capture long-range visual dependencies. Report tests show that in hundred-page document scenarios, SR-SWA's single-step decoding speed improves by 7 times and 5.6 times respectively compared to Full Attention and the previous-generation R-SWA.





With the development of AI technology, demand for parsing ultra-long documents such as lengthy research reports and entire books is growing, posing new challenges for OCR technology. Traditional OCR's parsing scope is mostly limited to a single page, and multi-page parsing usually relies on concatenating results; the first-generation Unlimited OCR extended the parsing scope to several dozen consecutive pages by introducing the reference sliding window attention mechanism; the newly released Unlimited OCR 2 further breaks through the computational bottleneck of ultra-long document parsing, using SR-SWA to reduce redundant visual information computation and combining the Unlimited-Horizon Decoding mechanism to reduce the computational and memory overhead of ultra-long document parsing, driving document parsing technology into the OCR 3.0 era and achieving true arbitrary-page-count document parsing.



The Unlimited OCR project has gained wide recognition from the global open-source community. After the first-generation Unlimited OCR was officially released on June 22, it topped GitHub's Daily Trending overall and Python charts, as well as HuggingFace's global model trending and multimodal model trending charts the next day, achieving first place on four charts; GitHub stars exceeded 10,000 within 5 days, making it a phenomenal hit project. To date, cumulative downloads on Hugging Face have exceeded 10 million, it has earned 28,500 stars on GitHub, and it has been shared and recommended by Turing Award winner and AI scientist Yann LeCun.



On November 12, the Baidu World 2026 conference will further showcase the technical highlights and application potential of Wenxin Unlimited OCR 2. Themed 'The Next Act: Intelligent Organizations', this year's conference will announce the latest upgrades to Baidu's 'Chip-Cloud-Model' full-stack AI, helping enterprises and developers accelerate AI application deployment and drive the evolution of intelligent organizations.



Currently, the code and model weights of Wenxin Unlimited OCR 2 have been open-sourced simultaneously on GitHub and Hugging Face, and are also available on the Baidu Intelligent Cloud platform and the Baidu AI Open Platform, where developers and enterprise users can download and use them.



Wenxin Unlimited OCR 2 open-source addresses:

  • GitHub: https://github.com/baidu/Unlimited-OCR

  • HuggingFace: https://huggingface.co/baidu/Unlimited-OCR-2

 


Original source

雷峰网 AI

Content notes

Original publication and rights belong to the source.

Machine translation · Refer to the original