Skip to main content
Baidu's Unlimited OCR 2 parses a hundred-page document, demonstrating advanced AI for text recognition.

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

Baidu Open-Sources OCR 2 for Hundred-Page Documents

• 4 min read

Baidu's research arm has put Unlimited OCR 2 on GitHub under an MIT license, and the numbers attached to it are the kind that usually invite skepticism. The 3.34-billion-parameter model reads hundred-page books, regulatory filings and reports in a single pass, converting page images into text, tables, formulas, figures, headings and reading order. On MarathonDocBench, Baidu's internal test for multi-page documents, it scored 77.1 against nine competing models, more than double the 33.7 posted by the next-best system, Kimi-K3.

The model runs on a single CUDA GPU in BF16, with Baidu testing it on an NVIDIA A800-80GB; the weights themselves total roughly 6.7 GB. It's a direct successor to Unlimited-OCR, which Baidu released in June 2026 as an attempt to extend DeepSeek-OCR's approach, and it keeps the same bones: a SAM ViT-B plus CLIP-L encoder feeding a 12-layer mixture-of-experts decoder, with each token routed to 6 of 64 experts plus 2 shared ones. What's changed is the attention mechanism underneath, built to stop decoding costs from ballooning as documents stretch into the hundreds of pages.

Baidu has released Unlimited OCR 2, an open-source OCR model built for very long documents. The 3B model parses books, filings and reports of hundreds of pages in one request. Its core change is SR-SWA, a sparse attention scheme that keeps per-step decoding cost nearly flat.

Why this matters

For anyone building document pipelines, the 131,072-token context ceiling and the MIT license matter more than the parameter count. A 3.34B model that holds decoding cost nearly flat at hundreds of pages, instead of letting it balloon quadratically, is the kind of engineering detail that decides whether you can actually run OCR on a 200-page filing on a single A800 or whether you're stitching together page-by-page hacks and losing cross-page context. The 273-image-tokens-per-page figure gives teams a concrete way to budget compute before they commit to a pipeline, which is rarer than it should be in open-source releases.

We'd still want independent benchmarks on accuracy across messy real-world scans, not just long clean PDFs, before treating this as a drop-in replacement for commercial OCR stacks. Baidu disclosing SR-SWA's mechanism but not active parameter counts is a small transparency gap worth watching. If the claims hold up under outside testing, this is a genuine option for startups that need long-document parsing without paying per-page API costs or building their own sparse-attention OCR from scratch.

Common Questions Answered

What is the key technical innovation in Unlimited OCR 2 that enables hundred-page document processing?

Unlimited OCR 2 uses SR-SWA, a sparse attention scheme that keeps per-step decoding cost nearly flat across long documents instead of increasing quadratically. This architectural innovation allows the 3.34-billion-parameter model to process hundreds of pages in a single pass while maintaining computational efficiency.

How does Unlimited OCR 2 perform compared to competing models on the MarathonDocBench benchmark?

Unlimited OCR 2 scored 77.1 on MarathonDocBench, Baidu's internal test for multi-page documents, which is more than double the 33.7 score posted by competing models. This significant performance gap demonstrates its superior capability for handling long-document OCR tasks.

What types of documents can Unlimited OCR 2 convert and what elements does it preserve?

Unlimited OCR 2 can process regulatory filings, reports, and books of hundreds of pages, converting page images into multiple output formats including text, tables, formulas, figures, headings, and reading order. This comprehensive conversion capability maintains the structural integrity of complex documents.

What are the practical advantages of Unlimited OCR 2's 131,072-token context ceiling for document processing workflows?

The 131,072-token context ceiling allows users to process 200-page filings on a single A800 GPU without stitching together page-by-page hacks that lose cross-page context. This capability is critical for maintaining document coherence and avoiding the computational overhead that would result from processing documents in fragmented segments.

Under what license is Unlimited OCR 2 released and where can it be accessed?

Unlimited OCR 2 has been open-sourced by Baidu's research arm under an MIT license and is available on GitHub. The MIT license allows for flexible use and integration into both commercial and open-source projects.

LIVE08:42Former GitHub CEO Launches Entire, a Git Platform for AI Agents