Baidu open-sources Unlimited OCR 2, a 3B model it says read 3,600+ pages in one go
Baidu has open-sourced Unlimited OCR 2, a document-parsing (OCR) model with about 3 billion parameters under the MIT license. It turns page images into text plus layout blocks with coordinates. Baidu says it parsed all seven Harry Potter books, more than 3,600 pages, in one go, and that its SR-SWA attention design keeps per-step decoding latency and memory nearly constant however long the document is. The catch: running it locally needs an NVIDIA GPU. Baidu tested it on an NVIDIA A800 80GB and published no consumer-GPU requirements, and loading it with trust_remote_code=True runs Baidu's custom code, so use a sandbox.
Try it
Open the official demo at https://huggingface.co/spaces/baidu/Unlimited-OCR-2 and upload a page image. Or, on your own NVIDIA GPU, load baidu/Unlimited-OCR-2 in Transformers with AutoModel.from_pretrained("baidu/Unlimited-OCR-2", trust_remote_code=True) and call model.infer_multi; the full code is on the model card.
We ran a single test page through the official demo and got the text and layout back. A multi-page job was refused for an anonymous user because of Hugging Face's free GPU time limit, so long documents may need your own GPU.