Baidu has introduced “Unlimited OCR,” an open-source model for document recognition that can transcribe entire books in a single pass without the memory requirements increasing with the document length. This is made possible by a new attention architecture that Baidu calls “Reference Sliding Window Attention” (R-SWA).
The Problem: Growing Memory Requirements for Long Documents
Most current OCR models based on large language models process documents page by page. With each additional page, the so-called KV cache grows – a temporary storage that remembers previous token representations so that the model can continue writing consistently. For very long documents like entire books, this growth eventually leads to insufficient available GPU memory or significantly slower processing.
The Solution: Reference Sliding Window Attention
According to the associated technical paper on arXiv, Baidu addresses this problem with R-SWA, an architecture that mimics how humans transcribe a book: the focus remains on the source, the immediately preceding context, and the words to be written next, while more distant, no longer needed information is deliberately “forgotten.” This keeps the size of the KV cache constant, regardless of how many pages have already been processed. According to Baidu, this allows the model to process more than 40 pages in a single forward pass without losing context or becoming noticeably slower.
Built on DeepSeek OCR
Unlimited OCR is not a completely new model but explicitly builds on the architecture of DeepSeek OCR, as stated in the GitHub repository, whose underlying principle – processing text content as a compressed image representation rather than as long character strings – was already described in the original DeepSeek-OCR paper. The model itself is relatively compact, with 3 billion total parameters, of which only about 500 million are active at runtime. Baidu releases model weights and code under the MIT license on GitHub and Hugging Face.
The Numbers in Detail
On the standard testing procedure OmniDocBench, which evaluates document recognition across text reproduction, formula recognition, table structure, and reading order, Unlimited OCR achieves a total score of 93.23 on the older version v1.5 – an increase of about 6.2 points compared to the DeepSeek-OCR model used as a baseline. On the newer version v1.6, Unlimited OCR scores 93.92 points. In a custom test set with books longer than 40 pages, the character error distance remained below 0.11, with a word accuracy (“Distinct-35”) of around 97 percent.
A Narrow Lead in a Highly Competitive Field
Important for context: The score of 93.92 on OmniDocBench v1.6 makes Unlimited OCR the best-placed model in Baidu’s own comparison table, but the gap to the next-ranked system is very narrow – on the order of a few hundredths of a point. Additionally, Baidu explicitly compares only with models listed in the official OmniDocBench repository; this is therefore a snapshot of a rapidly evolving field with predominantly self-reported values from various providers, not an independently verified overall ranking. The actual contribution of the paper lies less in a clear accuracy advantage and more in the ability to process very long documents with constant memory requirements in a single pass – an area where traditional page-by-page models structurally hit limits.
Not Really Unlimited Yet
The name “Unlimited OCR” describes more of a design direction than an absolute state. The tests documented in the paper cover books of over 40 pages; the actual practical upper limit of the method is not definitively quantified in the paper. It also remains unclear how robust the architecture is across very different document types – such as handwritten texts, multi-column layouts, or heavily damaged originals – over significantly longer stretches.
Why the Topic is Interesting Beyond OCR
The underlying idea of compressing text content through an image representation has relevance far beyond mere text recognition. As described in the DeepSeek-OCR paper, processing text as a compressed image requires significantly less computational effort than processing the same amount of text as a traditional character string. Researchers are therefore discussing whether such compression methods could be used in the future to increase the effectively usable context memory of language models without allowing the computational effort to grow proportionally.
Classification
Unlimited OCR demonstrates a concrete technical advancement in a practical problem: processing very long documents without growing memory requirements. The reported accuracy values are part of a highly competitive, rapidly changing research field with predominantly self-reported comparison values – the actual contribution lies less in a clear accuracy advantage and more in the architectural solution to the memory problem itself.


