Skip to content

Model Card: Baidu Unlimited OCR 2

Oct 27, 20261 min
TL;DRBaidu Unlimited OCR 2 (`baidu/Unlimited-OCR-2`): open-sourced 2026-10-27, 3.34B parameters (SAM ViT-B + CLIP-L encoder, 12-layer MoE decoder routing each token to 6-of-64 experts plus 2 shared experts), 131,072-token context window, MIT License; its core trick is SR-SWA (Sparse Reference Sliding Window Attention), which compresses cross-page text-visual attention into a fixed 512-token reference set; scores 84.6 on MPDocBench (dozens of pages) and 77.1 on MarathonDocBench (hundreds of pages) — only a 7.5-point drop; predecessor Unlimited-OCR 1.0 scored 0.0 on MarathonDocBench, and rival Qwen3.8-Max falls from 78.3 to 22.9; runs on a single NVIDIA A800-80GB with BF16 weights around 6.7GB

Look up & save

Loading dictionary…

🌏 中文版

Model Info

FieldValue
Model IDbaidu/Unlimited-OCR-2
VendorBaidu
Parameters3.34B total (active parameters undisclosed; 12-layer MoE decoder routing each token to 6-of-64 experts plus 2 shared experts, an architecture carried over from DeepSeek-OCR's DeepSeek3B-MoE-A570M)
Context Window131,072 tokens
Input price (USD/1M tokens)Not available (open weights plus Baidu Cloud docs only — no official hosted API pricing)
Output price (USD/1M tokens)Not available (same as above)
Open sourceYes (MIT License)
Release date2026-10-27
Official announcementBaidu Inc. on X: Unlimited OCR 2 is here
Hugging Facebaidu/Unlimited-OCR-2
FamilyUnlimited-OCR (predecessor Unlimited-OCR 1.0 shipped 2026-06-22, built to push DeepSeek-OCR's long-document parsing further; this generation's core advance is SR-SWA)

Highlights

  • SR-SWA (Sparse Reference Sliding Window Attention): compresses cross-page text-visual attention into a fixed 512-token working reference set (a 128-token local window plus top-16 selection over 32-token blocks), keeping per-step decoding latency and memory footprint nearly flat regardless of how many pages a document has
  • Scores 77.1 on MarathonDocBench (hundred-page documents), more than double the next-best model Kimi-K3 at 33.7; that's only 7.5 points below its own 84.6 on MPDocBench (dozens of pages)
  • Against its own predecessor, Unlimited-OCR 1.0: on the same MarathonDocBench test, the predecessor scored 0.0 while this generation scores 77.1 — the earlier model collapsed outright on hundred-page documents; this one is the first to actually hold up as documents get longer
  • 3.34B parameters (SAM ViT-B + CLIP-L encoder, 12-layer MoE decoder), runs on a single NVIDIA A800-80GB with BF16 weights around 6.7GB, and costs just 273 image tokens per page in multi-page mode

Benchmark Results

BenchmarkScorePredecessor (Unlimited-OCR 1.0)Best competitor
MPDocBench (dozens of pages, overall)84.661.9Qwen3.8-Max 78.3
MarathonDocBench (hundreds of pages, overall)77.10.0Kimi-K3 33.7
Text extraction (MarathonDocBench sub-score)89.6Sub-score not disclosedNot disclosed
Tables (MarathonDocBench sub-score)74.8Sub-score not disclosedNot disclosed
Heading hierarchy (MarathonDocBench sub-score, the model's weakest category)48.2Sub-score not disclosedNot disclosed

⚠️ All figures are Baidu's own self-reported results, published only as a leaderboard chart image on the model card (transcribed here by third-party coverage, not a data table). MarathonDocBench is a benchmark Baidu built itself; the dataset isn't publicly released, and no other team has independently reproduced these numbers yet.

Unlimited OCR 2 shrinks the score gap on long-document benchmarks
Unlimited OCR 2 shrinks the score gap on long-document benchmarksBaidu Unlimited OCR 2 drops only 7.5 points between MPDocBench (dozens of pages) and MarathonDocBench (hundreds of pages); rival Qwen3.8-Max drops 55.4 points, and predecessor Unlimited-OCR 1.0 collapses to zero. Score 80 40 0 MPDoc Marathon 84.6 77.1 78.3 22.9 61.9 0.0 Unlimited OCR 2 Qwen3.8-Max Unlimited OCR 1

Source: Baidu's official leaderboard chart (2026-10-27, all self-reported scores; MarathonDocBench is a Baidu-built benchmark with no public release yet). Conversion: baseline y=300, plot top y=60, domain 0–100 points, k=(300−60)÷100=2.4 (2.4 units per point), bar top y=300−score×2.4.

vs. Predecessor and Competitors

Against predecessor Unlimited-OCR 1.0, MPDocBench only improved by 22.7 points (61.9 → 84.6), but MarathonDocBench jumped from 0.0 straight to 77.1. That gap says a lot: the predecessor's infer_multi could already feed an entire document into one request, but it never actually solved the computational complexity of long-sequence attention, so it fell apart past some page count. SR-SWA's fixed-size reference set is what actually fixes the bottleneck — not a bigger context window or a multi-page inference interface.

Against Qwen3.8-Max, currently the runner-up on MPDocBench, the two are nearly tied on short documents (84.6 vs. 78.3, a 6.3-point gap). But move to the hundred-page MarathonDocBench and Qwen3.8-Max crashes from 78.3 to 22.9 — a 55.4-point drop — while Unlimited OCR 2 loses only 7.5 points. A high score on a short-document benchmark doesn't guarantee stability on long documents; what actually determines long-document parsing quality is whether the attention mechanism was designed for extreme sequence lengths, not how many parameters a model stacks or how large a context window it advertises.

On licensing, Unlimited OCR 2 sits in the same open-weight camp as DeepSeek-OCR-2 (Apache 2.0) and PaddleOCR-VL-1.6 (Apache 2.0): weights, code, and the technical report are all released under MIT, with no separate paid API product line.

What This Means for Agent Development

  • If you're building agents that process long documents (clause-by-clause contract comparison, annual financial-report archiving, RAG indexing for entire books): Unlimited OCR 2's pitch is "no chunking first" — infer_multi ingests a whole document in one request and preserves cross-page table, heading, and paragraph structure, which especially helps downstream tasks that need the full document structure (auto-generated tables of contents, precisely locating a cited passage) rather than page-by-page isolated text
  • If you're running a document-parsing pipeline and want to self-host inference: 3.34B parameters on a single A800-80GB with roughly 6.7GB of BF16 weights means a mid-tier GPU is enough, so you don't need to call an external OCR API — a realistic option for data that can't leave your premises (finance, healthcare documents)
  • If your task needs high accuracy on heading or chapter structure (auto-generating a table of contents or chapter summaries): note that heading hierarchy is the model's weakest sub-score (only 48.2 on hundred-page documents) — that part still needs human review or extra post-processing, not full automation
  • Not a fit: scenarios that need an official hosted API with SLA guarantees — Baidu currently only offers open weights and Baidu Cloud documentation, not a standard managed API like OpenAI's or Anthropic's, so you'll need to evaluate your own deployment and operations cost

Today's Insight

I used to assume "long-document OCR" mainly meant chunking and stitching, or just brute-forcing it with a bigger context window. Unlimited OCR 2's MarathonDocBench result breaks that assumption: the predecessor used the exact same "ingest every page at once" strategy (infer_multi), and its score collapsed to zero anyway. Only switching to a mechanism like SR-SWA — one that compresses attention into a fixed-size reference set — kept parsing quality from falling apart as page count grew. The reminder: the bottleneck in long-sequence tasks is often not "is the context window big enough," but whether the attention mechanism's own computational complexity has actually been solved.

References