TLDRocket
Sign in

Baidu Open-Sources Unlimited OCR 2 for Hundred-Page Document Parsing

MarkTechPost Asif Razzaq

Baidu open-sourced Unlimited OCR 2, a model that can read hundreds of document pages in one shot. It stays fast by shrinking attention to a fixed reference set, and it beat other models on Baidu’s charts.

Based on reporting by MarkTechPost, Asif Razzaq — read the original for the full story.

Summary, retelling and take written by AI under human oversight; images are AI-generated illustrations. How we work · Report an error

Baidu has put out Unlimited OCR 2, an open-source OCR model built for long documents that can handle books, filings and reports stretching across hundreds of pages in a single request. The model is 3.34 billion parameters, ships under the MIT license, and comes with code on GitHub. Baidu says it ran on one CUDA GPU in BF16 on an NVIDIA A800-80GB test setup.

The pitch is simple: keep parsing as documents get longer without the usual attention blow-up. Unlimited OCR 2 uses something Baidu calls SR-SWA, or Sparse Reference Sliding Window Attention. Instead of letting every new token stare at an ever-growing cache, the model works from a fixed reference set. Baidu’s own example uses 512 tokens, with a 128-token local window and top-16 selection over 32-token blocks. The result is that per-step decoding cost stays close to flat, even as page count climbs.

This is not just an engineering trick on paper. Baidu says the model scored first on both multi-page benchmarks it tested against nine other models. On MarathonDocBench, which covers hundreds of pages, Unlimited OCR 2 scored 77.1 overall. The next model on Baidu’s chart, Kimi-K3, scored 33.7. Baidu also shows a much smaller drop from MPDocBench to MarathonDocBench than rivals, while its predecessor, Unlimited-OCR, lands at 0.0 on MarathonDocBench.

The details are still very specific. The model keeps text, tables, formulas, figures, headings and reading order in the output. It routes each token through 6 of 64 experts, plus 2 shared experts, though Baidu does not give an active parameter count for version 2. For long-document work, the weak spot is heading hierarchy: 48.2 on MarathonDocBench, its lowest sub-score. But the larger point is hard to miss. Baidu is trying to make “hundreds of pages” feel routine, and it is doing it with an open model.

The model card also points to practical use: Transformers for quick tests, SGLang for serving, and a multi-page mode that parses a whole document in one request. There is still a catch, of course. Image encoding and total runtime rise with page count, and Baidu warns that a default bias setting can trigger a 462 MiB allocation and run out of memory.

My take — AI-written commentary, not fact-checked reporting

This is the kind of open release that actually matters: less chatbot theater, more useful infrastructure. The industry has spent years bragging about bigger contexts; Baidu is at least trying to make long-document parsing behave like a normal tool instead of a demo stunt. The amusing part is that the boring part — reading page after page — is where the real progress shows up.

Read more about this at: MarkTechPost

Related stories

The daily briefing

Every AI story that matters, in your inbox by 8am.

TLDRocket reads all relevant sources, removes duplicate coverage, and summarises the day in two minutes. Follow companies and topics for alerts, or get the briefing in Slack. Free, no spam, unsubscribe anytime.