Baidu open-sources Unlimited OCR 2, a 3-billion-parameter model that parses documents of hundreds of pages in one request
The MIT-licensed model uses a new attention method, SR-SWA, to keep memory nearly flat as documents grow. Its benchmark results are Baidu’s own.
Sources: Hugging Face, Baidu ERNIE Team, GitHub +2
In this story
Baidu’s ERNIE team released Unlimited OCR 2, a document parsing model, under the MIT license on October 27. The vision-language model parses ordered page images from documents hundreds of pages long in a single request. Weights are on Hugging Face and code is on GitHub, along with serving recipes for SGLang and vLLM. It builds on the first Unlimited OCR, released in June, and uses DeepSeek-OCR’s DeepEncoder. The mixture-of-experts model has 3 billion total parameters, with about 500 million active.
The main change is a new attention method called Sparse Reference Sliding Window Attention (SR-SWA). It compresses text and visual interactions into a fixed-size set of reference tokens, with 512 given as an example, so each new token no longer scans the whole document. Baidu says per-step decoding latency and memory stay nearly constant as documents grow. According to its paper, at the hundred-page scale SR-SWA delivers a 7x per-step speedup over full attention. Image encoding and total runtime still grow with length.
Baidu also released MarathonDocBench, a new benchmark of 100 documents running 103 to 300 pages. By Baidu’s own measurements, the model scored 77.06 there, versus 33.74 for Kimi-K3 and 28.61 for Gemini 3.8 Flash. On MPDocBench, with documents of up to 30 pages, it scored 84.59 to Qwen3.8-Max’s 78.30. The results have not been independently verified, and the longest benchmark is Baidu’s own. AlphaSignal notes that the fixed reference pool is a lossy summary, so details from much earlier pages can be lost.
Sources
5 sources
- “Unlimited OCR Works 2”Model card: MIT license, SR-SWA, usage and serving settings, release date · huggingface.co
- “Unlimited OCR Works 2: Pioneering the OCR-3.0 Era: From Long- to Unlimited-Horizon Parsing”Technical paper: architecture, speed measurements, MPDocBench and MarathonDocBench tables · huggingface.co
- Code repositorygithub.com
- “Baidu Open-Sources Unlimited OCR 2 to Parse Hundreds of Pages Without Breaking”Summary of the method and its limits · alphasignal.ai
About this story
- Written by
- Yiğit Kasap · JARRUS
- Story date
- On the site
- since Oct. 27, 2026
- Short link
thejarrus.com/en/unlimited-ocr-2- Report an error
- Spotted an error in this story? [email protected] · Instagram