HomeAIAI ModelsBaidu Releases Unlimited-OCR 2 for Documents Hundreds of Pages Long

Baidu Releases Unlimited-OCR 2 for Documents Hundreds of Pages Long

Baidu has released Unlimited-OCR 2, an open-weight model that turns scanned documents into structured text and that its ERNIE team says can work through files hundreds of pages long without its computing cost climbing as it goes. The weights are on Hugging Face and the code is on GitHub, both under the MIT licence, which allows commercial use.

Baidu’s model card dates the release to 27 October, though the GitHub code was updated on 26 October. All of the performance claims below come from Baidu’s own technical report and tests.

In brief

  • Unlimited-OCR 2 is a document-parsing model of about 3.3 billion parameters, released by Baidu under the MIT licence.
  • Baidu says a new attention method keeps the cost of each step nearly constant however long the document gets.
  • Its best scores come on MarathonDocBench, a hundred-page benchmark Baidu created for this release. No independent results have been published.

What the model does

Optical character recognition (OCR) models read images of pages and output text. Newer ones, like this one, also rebuild tables, formulas, figures and reading order. Unlimited-OCR 2 can take every page of a document in one request so it can use context across pages, according to the model card.

The change from the first version is in how the model pays attention to what it has already read. Baidu calls the method Sparse Reference Sliding Window Attention, or SR-SWA. Instead of looking back at every page each time it writes the next token, the model keeps “a fixed-size set of working references (e.g., 512 tokens)”. The report compares this to a person copying a book “without re-scanning preceding pages”.

Baidu claims that at the hundred-page scale this gives 7.0 times and 5.6 times faster decoding steps than two earlier attention methods. With a second technique that processes a long document in chunks, it says peak memory for the model’s working cache fell from 47.00GB to 1.77GB on a single document, and throughput rose from 360 to 1,315 tokens per second with 16 documents at once.

The model runs with Hugging Face Transformers or a customised version of SGLang, and Baidu tested it on an NVIDIA A800 GPU. The report lists the model as “3B-A0.5B”, meaning about half a billion parameters are active per step. It was trained on NVIDIA H800 clusters.

Baidu’s first Unlimited-OCR came out on 22 June and aimed, in the team’s words, to “push Deepseek-OCR one step further”, building on the document model from DeepSeek, which has also open-sourced its inference engine.

The benchmark wins come from Baidu’s own test

The headline numbers need care. Baidu’s largest lead is on MarathonDocBench, which the report calls “our newly proposed benchmark targeting hundred-page document parsing”. It holds 100 documents of 103 to 300 pages, with 205,000 marked-up layout elements. On it, Unlimited-OCR 2 scores 77.06 overall, against 33.74 for Moonshot’s Kimi-K3 and 26.97 for Google’s Gemini 3.1 Pro preview. The gap is large, but Baidu built the test, chose the rivals and ran every model itself.

On MPDocBench, a multi-page test with tens of pages, the margin is smaller: 84.59 against 78.30 for Alibaba’s Qwen3.8-Max, again on Baidu’s runs.

Baidu’s own tables also show limits. On OmniDocBench v1.6, a common single-page test, Unlimited-OCR 2 scores 94.02, behind TeleOCR at 96.91 and OvisOCR2 at 96.47. Baidu’s argument is that the model keeps strong single-page accuracy while adding long-document reach, not that it leads everywhere.

The report is also candid about weaknesses. It says the training data “remains limited in diversity” and that the sparse attention design “does not preserve global document information”, which limits its grasp of structures “such as heading hierarchies”. For long legal or technical files where section structure matters, that is a real gap, and Baidu suggests future work on linear attention to address it.

Until outside groups run the model on their own document sets, the fair reading is that Baidu has published a capable, permissively licensed long-document model with promising self-reported results. It joins a run of Chinese open releases, from Shanghai AI Lab’s Atria Dawn to Tencent’s Hy-Nomas, and a wider push for small models that run on modest hardware, such as NVIDIA’s Nemotron 3.5 Bolt.

Sources

  1. Hugging Face: baidu/Unlimited-OCR-2 model card (MIT licence; release dated 27 October 2026).
  2. GitHub: baidu/Unlimited-OCR (code, MIT licence; updated 26 October 2026).
  3. Baidu ERNIE Team: “Unlimited OCR Works 2: Pioneering the OCR-3.0 Era” (technical report, PDF).

Related stories

Follow @tsnmediahub on X for breaking AI news as it happens.

Follow on X

Share this story

Latest stories

More in this category

Latest stories

Explore the TSN Atlas: Every topic we cover, mapped. Click a bubble to dive in.