Baidu’s Unlimited-OCR Reads Dozens of Pages in One Pass
500M active parameters, R-SWA fixed-size KV cache, OmniDocBench beating much larger VLMs — multipage OCR without split-merge glue.
OCR is hot in Korea, and multipage jobs still break the same way: split pages, OCR each, glue results, lose context and formatting.
Baidu released Unlimited-OCR and shook that workflow again.
-
~500M active parameters yet 93.23% on OmniDocBench v1.5, above 235B Qwen3-VL (89.15%) and Gemini-2.5 Pro (88.03%). Architecture beat parameter bragging. (HF)
-
R-SWA (Reference Sliding Window Attention) keeps image tokens and prompts looking at all pages while generation only attends the last 128 tokens of output. KV cache becomes a fixed-size queue. 10k or 100k generated tokens, same memory footprint. (GitHub)
-
40+ pages without the classic slowdown. Old models grow KV with pages and decoding collapses. Fixed cache size removes that bottleneck on contracts and long reports.
-
Workflow change: before = split → per-page OCR → external merge. After = normalize format → whole PDF in one call. Cross-page structure stays intact.
-
infer_multi+ PyMuPDF to images, optional sglang OpenAI-compatible serve. MIT license, commercial use open.
OCR is moving from “read characters” to “understand multipage documents as one engine.” If you run document pipelines, study R-SWA.
Join the newsletter
Get insights on the latest AI.