Oossa

Baidu releases open-source OCR model for very long documents

Unlimited OCR 2 is a 3-billion-parameter model Baidu says can parse documents of hundreds of pages in one request. It is released under the MIT license.

By Published by Oossa: 1 min read

Annie Spratt · Unsplash

Baidu released Unlimited OCR 2 on October 27, 2026, an open-source optical character recognition (OCR) model designed to read documents spanning hundreds of pages in one request. The 3-billion-parameter model is licensed under MIT, and Baidu’s GitHub repository provides instructions for running it with Transformers or SGLang.

The repository says the model uses Sparse Reference Sliding Window Attention, or SR-SWA. Rather than letting attention calculations grow with the full length of a document, the method keeps a fixed-size set of references; Baidu gives 512 tokens as an example. Baidu says this keeps decoding time and memory use nearly constant as documents get longer. Those are the company’s claims, not independent measurements in the supplied material.

Baidu says Unlimited OCR 2 scored 77.1 on MarathonDocBench, a benchmark for documents of around a hundred pages. MarkTechPost also reports the score, but the available details do not specify the benchmark version, test settings or comparison models. Baidu describes the model as state of the art on both MarathonDocBench and MPDocBench; the repository does not provide scores for those comparisons in the supplied information.

How can people run it?

Baidu documents multi-page inference through Transformers and recommends SGLang for serving. Its Transformers example was tested with Python 3.10 and an NVIDIA A800 with 80GB of memory. That is a test setup, not a stated minimum hardware requirement.

The repository also describes a page-window option for SGLang, which processes a long document in smaller page groups. Baidu warns that smaller windows reduce peak memory use but can make it harder to connect content that continues across a window boundary. So the model’s ability to take many pages in one request does not mean every setup can handle any document size without limits: hardware and serving configuration still matter.

Why it matters

For organizations that digitize long reports or records, one request can let the model use information across pages rather than treating each page as a separate OCR job. Baidu provides an open MIT-licensed release, but the supplied details do not establish how accurately it performs on a particular organization’s documents or what hardware its workload will require.

Was this article useful?
Share

Read next

Oossa · Newsletter

The week in AI, explained

Every Monday: the stories worth knowing, in plain language. Free, no spam.