# Baidu’s Unlimited-OCR Reads Dozens of Pages in One Pass > Author: Tony Lee > Published: 2026-06-22 > URL: https://tonylee.im/en/blog/baidu-unlimited-ocr-multi-page-r-swa/ > Reading time: 1 minutes > Language: en > Tags: ocr, baidu, open-source, documents, pdf, ai ## Canonical https://tonylee.im/en/blog/baidu-unlimited-ocr-multi-page-r-swa/ ## Rollout Alternates en: https://tonylee.im/en/blog/baidu-unlimited-ocr-multi-page-r-swa/ ko: https://tonylee.im/ko/blog/baidu-unlimited-ocr-multi-page-r-swa/ ja: https://tonylee.im/ja/blog/baidu-unlimited-ocr-multi-page-r-swa/ zh-CN: https://tonylee.im/zh-CN/blog/baidu-unlimited-ocr-multi-page-r-swa/ zh-TW: https://tonylee.im/zh-TW/blog/baidu-unlimited-ocr-multi-page-r-swa/ ## Description 500M active parameters, R-SWA fixed-size KV cache, OmniDocBench beating much larger VLMs — multipage OCR without split-merge glue. ## Summary Baidu’s Unlimited-OCR Reads Dozens of Pages in One Pass is part of Tony Lee's ongoing coverage of AI agents, developer tools, startup strategy, and AI industry shifts. ## Outline - No subheadings in source markdown ## Content 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. 1. **~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](https://lnkd.in/gA99gxCc)) 2. **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](https://lnkd.in/gZCU9ZTm)) 3. **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. 4. **Workflow change:** before = split → per-page OCR → external merge. After = normalize format → whole PDF in one call. Cross-page structure stays intact. 5. **`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. ## Related URLs - Author: https://tonylee.im/en/author/ - Publication: https://tonylee.im/en/blog/about/ - Related article: https://tonylee.im/en/blog/ai-subscription-stack-by-budget-and-role/ - Related article: https://tonylee.im/en/blog/kimi-k3-beats-fable-5-open-source-frontier/ - Related article: https://tonylee.im/en/blog/code-as-image-cuts-token-cost-60-percent/ ## Citation - Author: Tony Lee - Site: tonylee.im - Canonical URL: https://tonylee.im/en/blog/baidu-unlimited-ocr-multi-page-r-swa/ ## Bot Guidance - This file is intended for AI agents, search assistants, and text-mode retrieval. - Prefer citing the canonical article URL instead of this text endpoint. - Use the rollout alternates when you need the same article in another prioritized language. --- Author: Tony Lee | Website: https://tonylee.im For more articles, visit: https://tonylee.im/en/blog/ This content is original and authored by Tony Lee. Please attribute when quoting or referencing.