baidu /Unlimited-OCR
Unlimited OCR Works: Welcome the Era of One-shot Long-horizon Parsing.
★ 31,055⑂ 3,324
31,055
stars
+590+670+4,375
3,324
forks
–
watchers
–
prs
–
issues
–
releases
–
discussions
README
Unlimited OCR Works
Pioneering the OCR-3.0 Era: From Long- to Unlimited-Horizon Parsing.
Release
- [2026/11/02] 📄 The paper of Unlimited OCR 2 is now available on arXiv.
- [2026/10/28] Thanks to the ms-swift community for supporting training of Unlimited OCR 2.
- [2026/10/27] 📊 We release MarathonDocBench, a new benchmark for ultra-long document parsing.
- [2026/10/27] 🤝 Thanks to the ModelScope community for their support. Our model is now available at ModelScope.
- [2026/10/27] 🤝 Thanks to the Baidu Cloud team for their support. Our model is now available on Baidu Cloud.
- [2026/10/27] 🤝 Thanks to AK for creating a new demo for us. Try it at Unlimited-OCR-2.
- [2026/10/27] 🚀 We release Unlimited OCR 2, achieving unlimited-horizon parsing with SR-SWA.
- [2026/07/21] 🤝 Thanks to the ms-swift community for their support, our model now supports training with ms-swift.
- [2026/07/03] 🤝 Thanks to the Baidu Cloud team for their support. Our model is now available on Baidu Cloud.
- [2026/06/28] 🤝 Thanks to the vLLM community and Tianyu Guo for their support, our model now supports vLLM inference.
- [2026/06/24] 🤝 Thanks to AK for creating a demo for us. It is now available at Hugging Face Spaces.
- [2026/06/23] 📄 Our paper is now available on arXiv.
- [2026/06/23] 🤝 Thanks to the ModelScope community for their support. Our model is now available at ModelScope.
- [2026/06/22] 🚀 We present Unlimited-OCR, aiming to push Deepseek-OCR one step further.
What's New in 2
Sparse Reference Sliding Window Attention (SR-SWA): Compresses text-visual attention interactions from ultra-long sequences down to a fixed-size set of working references (e.g., 512 tokens). This bounds computational complexity, keeping per-step decoding latency and memory footprint nearly constant regardless of document length.
From Long- to Unlimited-Horizon Parsing: Powered by SR-SWA, Unlimited-OCR 2 achieves true, unbounded document parsing within a finite context window—effectively eliminating quadratic attention scaling and memory bottlenecks as documents grow.
Ultra-Long Document Parsing SOTA: Achieves state-of-the-art performance across both dozens-of-pages benchmarks (e.g., MPDocBench) and extreme hundred-page benchmarks (e.g., MarathonDocBench).
Inference
Unlimited OCR 2 supports Transformers (native, for quick tests) and SGLang (recommended for serving).
Transformers
Tested with Python 3.10, torch==2.13.0, transformers==4.52.1, huggingface-hub==0.36.0, tokenizers==0.21.4, on an NVIDIA A800-80GB:
shell
pip install torch==2.13.0 torchvision pillow transformers==4.52.1 huggingface-hub==0.36.0 \
tokenizers==0.21.4 addict==2.4.0 einops==0.8.2 easydict==1.13
Load the model once:
python
import torch
from transformers import AutoModel, AutoTokenizer
model_name = "baidu/Unlimited-OCR-2"
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
model = AutoModel.f相关报道 (14)
note【毎朝のAI・テック要約】2026年11月2日 今日の注目ニュース3選2026-11-01PC Watch on MSNBaidu、数百ページの長文も高速OCRできる「Unlimited OCR 2」公開2026-10-29腾讯网百度开源文心Unlimited OCR 2,文档解析页数不再设限2026-10-28搜狐下载超 1000 万的模型上新!文心无限 OCR 干掉文档解析上限,3600 页一读到底2026-10-27新浪财经文档解析永动机!文心 Unlimited OCR 2 杀疯了,一口气读完三体全集2026-10-27techritual百度開源 Unlimited-OCR:33 億參數本機跑,一次過讀晒多頁文件2026-08-09moomooKimi K3、Unlimited OCR包攬全球前二,中國開源模型持續刷屏海外2026-08-08capitalfutures百度推出Unlimited OCR模型並在多個平台登頂2026-06-28電腦王阿達百度推出開源 OCR 模型 Unlimited-OCR,3B 參數碾壓 GPT-5 級模型2026-06-25品玩OCR 3.0 时代来了!文心 Unlimited OCR 2 开源发布,超长文档解析迎来“页数自由”2026-10-27
News & coverage (9)
Hacker NewsUnlimited OCR: One-shot long-horizon parsing▲ 496 · 110 comments · 2026-06-23note[Daily AI & Tech Summary] November 2, 2026: Top 3 News Stories of the Day2026-11-01letsdatascienceBaidu Open-Sources Unlimited OCR 2 for Single-Pass Long Document Parsing2026-10-27opensourceforuBaidu Open Sources Unlimited-OCR For 40-Page Document Reading2026-06-30PandailyBaidu Open-Sources Unlimited OCR 2, Parsing Documents of Any Length in One Pass2026-10-28MarkTechPostBaidu Open-Sources Unlimited OCR 2 for Hundred-Page Document Parsing2026-10-26RuntimeWireBaidu open-sources 3B OCR model for one-pass, multi-page PDF parsing2026-07-19조선일보Baidu Unveils OCR Model Reading 40 Pages at Once2026-06-29Alpha Match TechnologyBaidu's Unlimited OCR: The AI That Can Read an Entire Book in One Go2026-06-25