←News detail

LeiphoneUpdated Oct 27 18:09

Baidu Open-Sources ERNIE Unlimited OCR 2, Supporting Document Parsing of Any Page Count

AI summary

Baidu has released and open-sourced ERNIE Unlimited OCR 2, claiming it is the first to achieve document parsing of any page count; in testing, it parsed all 7 books of the Harry Potter series in a single pass, totaling more than 3,600 pages. The model achieved overall scores of 84.6 and 77.1 on MPDocBench and MarathonDocBench, respectively. It adopts the Sparse Reference Sliding Window Attention (SR-SWA) mechanism, and in hundred-page document scenarios, its single-step decoding speed is 7 times and 5.6 times faster than Full Attention and the previous-generation R-SWA, respectively. The code and model weights have been open-sourced on GitHub and Hugging Face, and the model is also available on the Baidu AI Cloud platform and the Baidu AI Open Platform.

Why read this

AI score 72

The original text provides benchmark scores for ultra-long document parsing and details of the sparse attention mechanism, which can be used to assess the engineering trade-offs of long-document OCR.

Topics

Tags

Body · AI translation

On October 27, Baidu released and open-sourced ERNIE Unlimited OCR 2, achieving arbitrary-page document parsing for the first time globally, pushing the processing limit of OCR from dozens of pages to "unlimited" and reaching state-of-the-art (SOTA) performance. Tests show that the model can parse all 7 books in the entire Harry Potter series in a single pass, totaling more than 3,600 pages, and still maintains high accuracy and processing efficiency even as document length increases substantially, 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 the ability to parse hundred-page-level ultra-long documents, ERNIE Unlimited OCR 2 achieved overall 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 benefits from the Sparse Reference Sliding Window Attention (SR-SWA) mechanism proposed by ERNIE Unlimited OCR 2. This mechanism draws on the process by which humans transcribe books—typically focusing on the current page and only looking back at relevant content when they need to verify earlier text or find cross-page information, rather than repeatedly flipping through the entire book.

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

With the development of AI technology, demand is growing for parsing ultra-long documents such as lengthy research reports and entire books, posing new challenges for OCR technology. Traditional OCR parsing is mostly limited to a single page, and multi-page parsing usually relies on stitching results together; the first-generation Unlimited OCR extended the parsing range to dozens of 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 by reducing redundant visual information computation through SR-SWA and, combined with the Unlimited-Horizon Decoding mechanism, lowering the computational and GPU memory overhead of ultra-long document parsing, driving document parsing technology into the OCR 3.0 era and achieving document parsing of truly arbitrary page counts.

The Unlimited OCR project has already gained widespread recognition from the global open-source community. After the first-generation Unlimited OCR was officially released on June 22, it topped the GitHub Daily Trending overall list and Python list, as well as the HuggingFace global model overall trending list and multimodal model trending list the next day, achieving first place on all four lists; its GitHub Stars exceeded 10,000 in 5 days, placing it among phenomenon-level hit projects. To date, cumulative downloads on Hugging Face have exceeded 10 million, and it has gained 28,500 GitHub Stars, and was reposted 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 ERNIE Unlimited OCR 2. With the theme "The Next Act: Intelligent Organizations," this year's conference will release Baidu's latest upgrades to its full-stack AI spanning chips, cloud, models, and agents, helping enterprises and developers accelerate the deployment of AI applications and driving the evolution of intelligent organizations.

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

ERNIE Unlimited OCR 2 open-source address:

Source

Leiphone