Baidu's 'Unlimited OCR' reads 40-page documents in one go — by learning to forget
A new open-source model from Baidu processes dozens of document pages in a single pass with flat memory use, topping the OmniDocBench leaderboard — weights and demo are free to try.
Turning scanned paperwork into usable text — OCR, short for optical character recognition — is one of AI’s most practical jobs. It’s also had a stubborn limit: current models choke after about ten pages at a time, because their memory footprint grows with every line they produce. Baidu researchers have now released Unlimited OCR, an open-source model that reads dozens of pages in a single pass while its memory use stays flat — and it currently tops the OmniDocBench document benchmark for end-to-end systems at 93.92 percent.
The trick is charmingly human. When you copy text from a book by hand, you don’t re-read everything you’ve already written — you keep your eyes on the source and the last few words you wrote, and older passages simply fade. Baidu built that into the model: each new piece of output can see the full document image, but only the last 128 tokens (roughly the last few sentences) of its own writing. The team calls it Reference Sliding Window Attention. The result: in tests past 40 pages, the error rate stays low, and the model generates about 13 percent faster than the DeepSeek OCR system it builds on — with the gap growing the longer the document gets.
What’s behind this? OCR has quietly become one of AI’s most competitive corners, and not just for reading contracts. Text stored as an image uses far less compute than the same text as tokens, so labs see document-reading tech as a path to giving language models cheaper, longer memory — the same idea behind the pxpipe tool we covered last week, which cuts token costs by rendering prompts as PNGs. A fair caveat: “unlimited” oversells it a bit. The model’s fixed 32,000-token context still caps how many pages fit in one pass, and very small print trips it up. Baidu says 128,000-token versions are planned.
What this means for you: This one you can actually try today — the code and model weights are free on GitHub and Hugging Face, and there’s a browser demo on Hugging Face Spaces, no setup needed. If you regularly wrestle scanned PDFs, invoices, or old paper archives into text, the state of the art just got faster, longer-winded, and free. For the more technical crowd: at 3 billion parameters with only about 500 million active, this is small enough to run on modest hardware — a genuinely useful local tool, not just a benchmark headline.
Sources
Mistral's CEO has a warning: closed AI models get a front-row seat to your business
Arthur Mensch says companies relying on closed AI models hand over a window into their own operations — and a fresh finance experiment partly backs him up.