AI news
Baidu's Unlimited OCR 2 Parses 300-Page PDFs With a 1.77GB KV Cache — DeepSeek-OCR Lineage, MIT, Released Oct 27
Verdict: Baidu released Unlimited OCR 2 yesterday (Oct 27) — a 3B-total/500M-activated MoE built on DeepSeek-OCR's DeepEncoder, MIT licensed, with a trick that keeps KV cache nearly flat as documents grow: 47GB → 1.77GB peak on a hundred-page sequence, with throughput rising from 360 to 1,315 tokens/s at batch 16. If you're building RAG or agent pipelines over book-length PDFs — contracts, filings, archives — this moves hundred-page one-shot parsing from "needs an 80GB datacenter card" toward "fits a 24GB consumer card." It is not the accuracy king on single pages (TeleOCR scores higher on OmniDocBench), and its long-document benchmark is Baidu's own. For multi-page pipelines, though, this is currently the most interesting open release in the niche.
Last checked 2026-10-28. Released 2026-10-27 — hours old at time of writing; third-party benchmarks don't exist yet.
The English coverage of this release is essentially zero right now, which is odd, because the Chinese coverage got the headline wrong anyway. QbitAI led with "cache cut 96%" — true, but the more useful number for anyone deploying this is what the cache figure implies: the memory cost of parsing a 300-page document no longer scales with the document. Here's the full account, verified against the technical report PDF Baidu shipped in the repo.
What shipped, and what it's built on
Unlimited OCR 2 landed on October 27 in the existing baidu/Unlimited-OCR GitHub repo (the v1 repo sits at ~29.3k stars, created June 2026, MIT — and the v2 branch carries the same MIT license). Weights are on Hugging Face as baidu/Unlimited-OCR-2, with a ModelScope mirror under the PaddlePaddle org and an HF Spaces demo. Baidu also open-sourced MarathonDocBench the same day, a benchmark targeting 100–300 page documents.
Architecture, from the technical report: the DeepEncoder from DeepSeek-OCR — Baidu says so explicitly, this is a DeepSeek-OCR-lineage model — paired with a MoE decoder of 3B total parameters, 500M activated per token. Training was one post-training epoch over 2M multi-page plus 10M single-page documents, on a 25×8 H800 cluster. One detail worth savoring: the training pseudo-labels were extracted with MinerU, a rival open-source parser. Document-parsing models are now being trained on each other's outputs; the data flywheel in this niche is officially circular.
The memory math, from the report
The mechanism is SR-SWA (Sparse Reference Sliding Window Attention), and the framing that makes it click is Baidu's own: the model reads like a person copying a book — look at the page you're transcribing, and only glance back at specific pages when the content demands it. Two filter stages implement that: a Page Gate picks which earlier pages matter, and a Token Sieve picks which visual tokens within those pages matter, collapsing remote context into a fixed-size working reference set (~512 tokens). Add a fixed local window for continuity, and per-step cost stops depending on document length.
Reported in Table 4 of the technical report, on hundred-page MarathonDocBench inputs:
| Decoding mode | Peak KV memory (batch 1) | Throughput (batch 16) |
|---|---|---|
| Standard decoding (all pages' visual KV resident) | 47.00 GB | 360 tok/s |
| Unlimited-horizon decoding | 1.77 GB | 1,315 tok/s |
Per-step decoding is claimed 7.0× faster than full attention and 5.6× faster than v1's R-SWA at the hundred-page scale. Read the fine print with me: 1.77GB is KV cache only — the weights (3B total, BF16) and activations still bill you, so "runs on a Raspberry Pi" takes are wrong. But the delta is still decisive: 47GB of cache alone rules out every consumer GPU; 1.77GB makes hundred-page one-shot parsing plausible on a 24GB card, weights included.
The scores — including the ones Baidu loses
On MPDocBench (up to 30 pages, end-to-end), Unlimited OCR 2 scores 84.59 overall, against 61.89 for its own predecessor — a generational jump, and reportedly SOTA among end-to-end VLM parsers. On the new MarathonDocBench (100–300 pages): 77.06. The instructive rows are the general-purpose models on the same eval: GLM-5.3-Flash manages 7.51, other frontier VLMs score in the single digits to low teens. Whatever generosity you assume in a self-built benchmark, the ordering is believable — general VLMs genuinely collapse when you hand them a 300-page document in one sequence.
Now the honest part. On single-page OmniDocBench, Unlimited OCR 2 scores 94.02 — a hair above its predecessor (93.92) but below TeleOCR's 96.91, FireRed-OCR (93.26, 2B) is close, and DeepSeek-OCR 2 (90.25) and dots.ocr (90.77) trail on this table. The sparse-attention design preserves local recognition well but doesn't win it. If your pipeline is single-page receipts and invoices, this release isn't for you; specialists still own that track. The bet here is specifically multi-page: cross-page text and table metrics (T-Text, T-Table) are where it claims SOTA.
One more caveat, flagged rather than buried: MarathonDocBench is Baidu's benchmark, released the same day as the model. Self-refereeing on your own track is standard practice in this niche — OXR's team did the same last week — but treat the absolute 77.06 as provisional until someone else runs the eval.
Deployment notes
Transformers works natively for quick tests; the report's pipeline runs on SGLang, which has the Unlimited-Horizon decoding paradigm integrated — that's the recommended serving path, and the thing that actually delivers the flat memory curve. Multi-page inference sends all pages in one request so the model can use cross-page context; a <PAGE> marker token separates inputs. Serving is served; fine-tuning story is unclear at release — the report describes post-training, not a recipe you can replicate at home.
If you don't want to self-host, the model is also on Baidu Cloud OCR — the hosted option is the convenience play; the MIT license on the weights is the one that matters for pipeline builders.
Related reading
- EdgeRock-4B: constant-memory KV — the same "memory shouldn't scale with input" idea in a general LLM, from a different team
- DeepSeek DeepInfer open-sourced — the inference stack whose OCR encoder this model inherits
- MOSS-Image local deployment — why the text encoder, not the headline parameter count, sets your VRAM bill
Sources: baidu/Unlimited-OCR repo + Unlimited-OCR-2 branch and its technical report PDF (architecture, Table 1–4 numbers, training details, release dates — pulled 2026-10-28); GitHub API (stars, MIT license); QbitAI 2026-10-27 report (v1 download count ~10M, demo framing) — transcribed, not independently verified.