Baidu Open-Sources Unlimited OCR 2 for Thousand-Page Document Parsing
Baidu released and open-sourced ERNIE Unlimited OCR second generation on October 26-27, pushing the limit of ultra-long document OCR parsing from dozens of consecutive pages to the thousands-of-pages level. The company positions it as an unlimited-length document parsing solution for the "OCR-3.0 era."
Confirmed
- The core mechanism is Unlimited-Horizon Decoding, paired with the newly proposed SR-SWA mechanism: text-vision attention interactions are compressed into a fixed-size set of working references, so attention computation for long documents no longer scales linearly with length and latency stays nearly constant.
- Demonstrated capabilities: end-to-end one-pass parsing of the 1200+ page three-volume "The Three-Body Problem" and the 3600+ page full seven-book "Harry Potter" series.
- Comparison data relayed by @xiaohu: KV cache dropped from 47GB to 1.77GB, a significant reduction.
- The model has been released on Hugging Face as Unlimited-OCR-2, an image-text-to-text pipeline model with weights provided in safetensors; it can be loaded via transformers (flagged as customcode).
Why it matters
- Ultra-long document parsing has long been a bottleneck for OCR and multimodal models: as documents grow, attention computation explodes, and previous approaches had to process page by page and stitch results together. With SR-SWA, Unlimited OCR 2 largely decouples compute and latency from document length, paving a viable path for one-shot structured parsing of entire books, lengthy contracts, and long reports.
- Releasing the weights as open source means the community can deploy and build on the model directly, potentially upgrading applications such as long-document RAG and archive digitization.
2026-10-26 ~ 2026-10-27 · 5 related posts
- Episode 1: Baidu Open-Sources Unlimited OCR 2 for Thousand-Page Document Parsing(2026-10-26, 5 posts)
- Episode 2: Unlimited OCR Gen 2 Runs 5.6x Faster on Long Documents with Far Less VRAM(2026-10-27, 4 posts)
Primary sources
- Baidu open-sources Unlimited OCR 2 with SR-SWA for unlimited-length document parsing — Baidu_Inc ·
- Baidu releases Unlimited-OCR-2 multilingual vision-language OCR model on Hugging Face — baidu ·
- Unlimited OCR 2 ingests 3,600-page Harry Potter in one go, cutting KV cache from 47GB to 1.77GB — xiaohu ·
- [source] Baidu releases Unlimited-OCR-2 multilingual vision-language OCR model on Hugging Face — baidu · 2026-10-26
- Baidu open-sources Unlimited OCR 2: near-constant latency on documents of any length — Baidu_Inc · 2026-10-27
- [source] Unlimited OCR 2 ingests 3,600-page Harry Potter in one go, cutting KV cache from 47GB to 1.77GB — xiaohu · 2026-10-27