Baidu has open-sourced Unlimited-OCR, a compact document-parsing model that can transcribe dozens of pages in a single forward pass. Released on GitHub on June 22, 2026, with an accompanying arXiv paper the next day, it targets the one task that breaks most OCR pipelines: very long documents that do not fit in a normal context window.

What Happened

Unlimited-OCR is a roughly 3-billion-parameter model published under the permissive MIT license. It handles single images, multi-page image sets, and full PDFs, and it ships in two modes: a "base" mode for standard pages and a "gundam" mode for cropped or dense layouts. The model is available now through the Hugging Face transformers library and on ModelScope, with an SGLang server path for batched, concurrent requests.

Why It Matters

Long-document OCR usually means slicing a file into pages, running each separately, then stitching the text back together and hoping the layout survives. Unlimited-OCR collapses that into one pass. The paper reports 93% on the OmniDocBench v1.5 benchmark, a six-point gain over the DeepSeek-OCR baseline it builds on. For anyone turning contracts, research PDFs, or scanned archives into structured text for a RAG system, fewer moving parts means fewer places for errors to creep in.

Key Details

The core trick is what Baidu calls Reference Sliding Window Attention, which replaces every attention layer in the decoder and holds the KV cache at a constant size throughout decoding. Combined with DeepSeek-OCR's high-compression encoder, that lets the model process up to a 32K maximum length, enough for dozens of pages, without the memory blowup that long-context decoding normally causes. Because the model emulates the way human working memory tracks a long document, it keeps reading order and table structure intact across page breaks, which is exactly where naive page-by-page pipelines fall apart. The MIT license clears it for commercial use, and the small 3B footprint means it runs on a single consumer GPU.

What to Do Next

Start with a single multi-page PDF you already need parsed. Run it in base mode, then re-run a dense table page in gundam mode to compare. Pipe the output straight into a retrieval index rather than post-processing per page. For batch jobs, the SGLang server path lets you fan out concurrent requests across a document set without standing up a heavy serving stack. If you are weighing options, compare it against the workflow in our look at Mistral OCR 4 and our guide to local offline RAG for Claude and Cursor.