Baidu, a Chinese AI company, recently open-sourced a new document parsing model called “Unlimited-OCR” on Hugging Face, which has accumulated over 5,100 stars on GitHub within just two days of launch. This model with only 3B parameters scored 93.23% on OmniDocBench, surpassing large-scale models like Gemini-2.5 Pro and Qwen3-VL, and outperforming DeepSeek-OCR by over 6 percentage points. Chinese media described it as “small parameters solving the long document forgetting problem.” More surprisingly, the core author is suspected to be Wei Haoran, a prominent figure who left DeepSeek, making this open-source project a hot topic both technically and in terms of gossip.
Unlimited-OCR 🔥New OCR from @PaddlePaddle
It can parse hundreds of pages in a single pass while maintaining stable speed.
The key idea is R-SWA (Reference Sliding Window Attention), which keeps KV cache constant during decoding.
🏆 93% on OmniDocBench
📈 +6% over… pic.twitter.com/uuXPUhL22L— Adina Yakup (@AdinaYakup) June 22, 2026
Baidu releases open-source OCR application Unlimited-OCR, with 3B parameters crushing GPT-5 level models
For a long time, the dominant approach for AI to process multi-page OCR documents has been “page-by-page recognition with external stitching,” where each page is fed into the model independently and then an external scheduler stitches the results together. The problems with this approach are obvious: broken context, inconsistent formatting, and cross-page tables that cannot be correctly parsed. The solution proposed by Unlimited-OCR is to use a brand-new attention mechanism that allows the model to read through dozens of pages of a document in one go and output complete results without interruption. This not only improves recognition accuracy but also greatly simplifies the deployment process, eliminating the need for additional schedulers and post-processing pipelines.
R-SWA Core Technology: Fixed KV Cache, No More Forgetting in Long Documents
Unlimited-OCR’s core innovation is R-SWA (Reference Sliding Window Attention). Traditional attention mechanisms see KV cache grow linearly with output length during decoding, which quickly exhausts VRAM when processing documents spanning dozens of pages. R-SWA enables the model to only look back at the most recent 128 tokens during output, while maintaining full attention to reference-side image tokens—like a person copying text, who can always see the original but focuses only on the few lines just written. This mechanism turns the KV cache into a fixed-size circular queue, where memory usage remains identical whether outputting 10,000 or 100,000 tokens. Flash Attention v3’s latency tests show that R-SWA’s inference time is nearly a flat line from start to finish, completely unaffected by output length.

Alongside R-SWA is DeepEncoder’s extreme visual compression technology, which compresses a 1024×1024 PDF page to just 256 visual tokens—a compression ratio of up to 16x. These visual tokens do not participate in state transitions under the R-SWA mechanism, ensuring image information remains clear and available throughout the entire long-range parsing process. The combined result: the model can process documents of over 40 pages at once without memory loss, with a 20-page edit distance as low as 0.057, and only 0.11 for 40+ pages.
Benchmark results: Small models with fewer parameters beat larger models
Unlimited-OCR adopts MoE architecture with 3B (3 billion) total parameters, but only activates 500M—merely a fraction of Qwen3-VL’s 235B—yet scores 4 percentage points higher. It achieves 93.23% on OmniDocBench v1.5 and reaches 93.92% on v1.6, ranking first across all benchmarks. In terms of throughput, TPS reaches 7,847, which is 35% higher than DeepSeek-OCR. Across detailed capabilities, the seven categories including text recognition and reading order all outperform DeepSeek-OCR by at least 2 percentage points.
| Model | parameter count | OmniDocBench v1.5 | OmniDocBench v1.6 |
|---|---|---|---|
| Unlimited OCR | 3B (500M Activations) | 93.23% | 93.92% |
| DeepSeek OCR | — | 87.01% | — |
| Qwen3-VL | 235B | 89.15% | — |
| Qwen2.5-VL | 72B | 87.02% | — |
| Gemini-2.5 Pro | — | 88.03% | — |
Compared with other mainstream models: DeepSeek-OCR at 87.01%, Qwen2.5-VL 72B at 87.02%, Gemini-2.5 Pro at 88.03%, and Qwen3-VL 235B at 89.15%, Unlimited-OCR with just 3B parameters accomplished what none of them could. In particular, Qwen3-VL is a massive model with 235B parameters, while Unlimited-OCR activates only 500M, creating a 470x gap in parameter efficiency. This demonstrates the tremendous efficiency advantages of R-SWA and DeepEncoder’s technical approach, and gives the industry a全新的認識 of MoE architecture’s potential in smaller-parameter models.
Open Source Ecosystem: MIT License
Unlimited-OCR adopts MIT license and can already be Hugging Face Download model weights and provide a complete inference script. Two modes are supported: “gundam” mode for single high-resolution pure text images (using crop tiling strategy), and “base” mode for single or multi-page PDF parsing, both supporting a maximum context length of 32,768 tokens. Developers can load the model directly via Hugging Face Transformers, or use SGLang to deploy an OpenAI-compatible API service. Inference examples on GitHub cover the complete workflow from single image to PDF batch conversion, along with auxiliary scripts for converting PDFs to images. Additionally, community members have set up an online Demo on Hugging Face Spaces (maintained by well-known AI blogger akhaliq), allowing direct upload of images or PDF files to experience the results without setting up your own environment.

The Author Mystery: The Suspected DeepSeek Defector
A mysterious “YY†” abbreviation marker appears in the author list of the paper, and with the GitHub acknowledgments section listing DeepSeek-OCR and DeepSeek-OCR-2 in the first and second positions, speculation has run wild. According to industry sources, Wei Haoran, the core author of the DeepSeek OCR line (who developed GOT-OCR2.0 and later joined DeepSeek to build the OCR line), had his name marked with an asterisk indicating his departure when DeepSeek V4 was released in April this year. Wei Haoran’s technical trajectory, from Step Space’s GOT-OCR2.0, to DeepSeek’s DeepEncoder and MoE decoder, to Baidu’s open-sourced Unlimited-OCR today, has left clear technical footprints at each stop. Whether YY is indeed Wei Haoran or not, Unlimited-OCR’s technical approach unmistakably bears the imprint of DeepSeek OCR, making it essentially the same technical philosophy flowering at Baidu.
Conclusion
The technical foundation behind Unlimited-OCR didn’t happen overnight. While the R-SWA design approach is simple and straightforward, it solves the most troublesome “memory loss” problem that has plagued long-document OCR over the past few years. The official roadmap has already announced that the next phase will extend context to 128K and build a prefill pool to enable automatic page turning for the model. By then, OCR will no longer be just a “character recognition tool” but a true long-document understanding engine. For developers, you can now download the model on Hugging Face and try it yourself. With MIT licensing, there are no commercial restrictions, making it one of the most sincere OCR projects in the open-source community recently, balancing both buzz and practicality. Judging from the enthusiastic community response, Unlimited-OCR has successfully captured attention from developers everywhere. The subsequent ecosystem development is worth anticipating—if you have substantial document OCR needs and prefer alternatives to Chinese open-source AI, this is worth trying.
Source: KOCPC Chinese