Summary
Baidu’s Unlimited OCR introduces a fundamentally different approach to document parsing: processing entire multi-page documents in a single forward pass at constant speed and constant memory, regardless of document length. The model achieves this through Reference Sliding Window Attention (RSWA), which limits the decoder’s attention to the full image context plus only the last 128 generated tokens โ evicting older tokens like a queue rather than accumulating an ever-growing KV cache. This directly solves the core architectural ceiling of DeepSeek OCR, where memory and compute scaled proportionally with document length, making book-length parsing in one shot practically impossible.
Fahd Mirza installs and runs Unlimited OCR locally on an Ubuntu system with an Nvidia RTX 6000 GPU using the Transformers library and a Gradio interface. The model consumes under 7GB VRAM at rest and approximately 8.5GB while actively parsing โ well within reach of commodity hardware. Mirza tests it by feeding it the model’s own published research paper, a document containing multi-column layouts, equations, tables, and diagrams. The model parses all 14 pages in one streaming pass, outputting structured bounding box coordinates (DET tags with X1, Y1, X2, Y2 coordinates) alongside recognized text, with detection and recognition happening simultaneously in a single end-to-end pass.
On OmniDocBench, Unlimited OCR runs 13% faster than DeepSeek OCR on standard documents, with the performance gap widening significantly as documents grow longer. The video provides both a live accuracy check and a clear explanation of the architectural decisions that make constant-memory long-document parsing possible.
๐บ Source: Fahd Mirza ยท Published June 24, 2026
๐ท๏ธ Format: Tutorial Demo







