Baidu has released Unlimited-OCR 2, an open model for turning very long scanned documents into text. The model card lists an MIT licence and a release date of 27 October, and the weights hold about 3.3 billion parameters according to Hugging Face’s file metadata.
The first Unlimited-OCR, released in June, described itself as pushing DeepSeek-OCR “one step further”. Version 2 is about length.
How it stays flat
The new piece is Sparse Reference Sliding Window Attention (SR-SWA). Instead of attending to the whole growing document, the model compresses text and image interactions to “a fixed-size set of working references (e.g., 512 tokens)”. Baidu says this keeps “per-step decoding latency and memory footprint nearly constant regardless of document length”.
That matters for ingestion. Most OCR models in RAG pipelines work page by page and lose cross-page context, or run out of memory on long inputs. Unlimited-OCR 2 parses all pages of a document “in one request, so the model can use cross-page context”, and returns one tagged block per page in order.
Claims to check
Baidu says the model is state of the art on MPDocBench (dozens of pages) and on MarathonDocBench, a new benchmark for hundred-page documents that it released the same day. Those are Baidu’s own results on, in one case, Baidu’s own benchmark. Test it on your documents before replacing a working pipeline. For comparison, our story on LightOnOCR-3 covers a smaller model built around layout grounding.
Running it
- Transformers for quick tests. The card was tested with torch 2.13.0 and transformers 4.52.1 on an NVIDIA A800 80GB.
- SGLang is recommended for serving, through a customized SGLang wheel from the GitHub repo. PDFs are converted to page images with PyMuPDF first.
- Hosted options are listed on ModelScope, Baidu Cloud and a Hugging Face Space.

The Campfire
CommentsThanks. Your comment is waiting for the desk. Once it is approved it appears here within about a minute.
Add a comment