Baidu has released 'Unlimited OCR,' an AI model capable of reading long documents in one go, as open source.

Baidu has released 'Unlimited OCR,' an AI model designed to read long documents in a single step, as open source. Unlimited OCR is an OCR model that reads text contained in images and PDFs, and it is said to have a particular emphasis on analyzing long documents that span multiple pages.
[2606.23050] Unlimited OCR Works
We're open-sourcing Unlimited OCR — built to read long documents in one pass.
— Baidu AI (@BaiduAI_News) June 23, 2026
With 3B total parameters and only 500M activated, Unlimited OCR sets new end-to-end SOTA results on OmniDocBench v1.5 and v1.6.
The key innovation is Reference Sliding Window Attention (R-SWA),… pic.twitter.com/cBRqmyRUKN
OCR plays a crucial role in extracting text from images when scanning paper contracts into PDFs, scanning multiple pages of research papers, or searching for specific information in manuals or meeting minutes. While traditional OCR can easily handle short images, PDFs with dozens of pages require processing each page individually and then stitching the results together. Processing pages separately is not only time-consuming but also prone to losing context and the connections between tables.
In recent years, OCR (Optical Character Recognition) that uses AI models to read text and document structure within images has become increasingly common. Using AI models allows for reading that considers not only the flow of text but also tables and layout. However, a challenge has been that as the output text becomes longer, the 'KV cache,' which is a temporary memo used by the AI to remember previously outputted content, increases, leading to increased memory usage and a decrease in generation speed.
Unlimited OCR is a new open-source model released to address these long-text processing challenges. The paper explains that it uses 'DeepSeek-OCR,' released in October 2025, as a baseline, and is designed to mitigate the issue of increased memory usage during long-text output using R-SWA.
DeepSeek releases 'DeepSeek-OCR,' a multimodal AI model that compresses text input using visual information - GIGAZINE

Unlimited OCR is characterized by its ability to analyze long documents in a single processing step. The paper explains that it can transcribe documents of several tens of pages in a single inference process, under the condition of a maximum context length of 32K.

The mechanism implemented to support long-text processing is 'Reference Sliding Window Attention (R-SWA).' Attention is a mechanism that determines which part of the input the AI focuses on, and R-SWA uses reference information such as document images, treating a certain range of the most recent output text as working memory. Instead of storing all output indefinitely, it uses necessary reference information and the most recent context to keep the KV cache constant, thus reducing processing costs even for long texts.

The model has a total of 3 billion parameters, but only 500 million parameters are actually enabled during processing. Instead of using all parameters at all times, the design enables only a portion, balancing the capabilities required for long-text processing with computational efficiency.
The sample code on GitHub demonstrates how to handle multi-page images and PDFs. It explains that PDFs are processed by converting each page into an image before performing multi-page analysis.

Baidu has released the code and model weights for Unlimited OCR under the MIT license, and at the time of writing, they are available on GitHub , Hugging Face , and ModelScope . The paper also states that R-SWA can be applied not only to OCR but also to processes that handle long outputs such as speech recognition and translation, suggesting that the mechanism of AI that reads long texts may be expanding to fields other than documents.
Related Posts:
in AI, Posted by log1d_ts







