> ## Content Index
> Fetch the complete content index at: https://globalfeed.ai/llms.txt
> Use this file to discover other available public pages before exploring further.

# Baidu's open Unlimited-OCR-2 reads documents hundreds of pages long in one pass
- URL: https://globalfeed.ai/en/baidus-open-unlimited-ocr-2-reads-documents-hundreds-of-pages-long-in-one-pass/
- Published: 2026-10-28T01:56:41.000Z
- Updated: 2026-10-28T01:56:41.000Z
- Description: Baidu's ERNIE team has released Unlimited-OCR-2, an MIT-licensed document parsing model. A sparse attention method lets it process documents hundreds of pages long in a single request, and the team has also published MarathonDocBench, a new benchmark for long documents.
- Author: GlobalFeed Editor
- Tags: Baidu, Unlimited-OCR-2, OCR, document parsing, Open Model, Open Source, AI, x-Baidu_Inc, dil-en, elle

Baidu's ERNIE team [released Unlimited-OCR-2 on October 27](https://github.com/baidu/Unlimited-OCR?ref=globalfeed.ai), a document parsing (OCR) model that turns text, tables and formulas in page images into structured text. According to the team, it can read a document hundreds of pages long in a single request while keeping the connections between pages. The model files are open on [Hugging Face](https://huggingface.co/baidu/Unlimited-OCR-2?ref=globalfeed.ai) under the MIT license, so you can run the model on your own server. It is a 3-billion-parameter mixture-of-experts (MoE) model with about 0.5 billion parameters active per step.

## Attention that looks only where it writes

The first Unlimited-OCR, released in June, aimed to keep memory use constant on documents of dozens of pages, but it still looked at the visual information of every page each time it produced a new word. As documents grew to hundreds of pages, that made every step more expensive. The main change in the new version is a sparse attention method the team calls SR-SWA: much like a person copying a book by hand looks only at the spot being transcribed, the model limits its attention to a fixed number of references on the relevant pages. According to the technical report, at the hundred-page scale this speeds up each step 7 times over full attention and 5.6 times over the previous method, and per-step time stays nearly constant as documents grow longer.

## A new benchmark: MarathonDocBench

The team also released MarathonDocBench, a new benchmark of 100 documents ranging from 103 to 300 pages. According to the report, the model scores 77.06 on it and leads both closed and open rivals on this benchmark and on MPDocBench, which covers documents of dozens of pages. On single pages it scores 94.02 on OmniDocBench v1.6, in line with the first version; on that test, smaller models such as TeleOCR and OvisOCR2 score higher. The model runs with Transformers and with SGLang, which is recommended for serving; PDF files are first converted to page images.

The team itself names two limits in its report: the training data has limited diversity, and because the sparse attention does not preserve global document information, the model can struggle with document-level structure such as heading hierarchies. Labels for the training data were also largely generated from the outputs of other models such as MinerU and PaddleOCR-VL. The model page does not list supported languages, so its performance on Turkish documents is unknown. For a fuller picture, follow evaluations from independent researchers as well.