1 Unlimited OCR — Baidu's New Open-Source Model
Baidu released Unlimited OCR on June 22, 2026 — a document parsing model with 3 billion total parameters, of which only 500 million are activated during inference (a Mixture-of-Experts architecture). The model targets a specific and well-known problem: end-to-end OCR models that become progressively slower as documents get longer.
The headline capability: under the standard maximum context length of 32,000 tokens, Unlimited OCR can read an entire book in a single forward pass — for the first time. This is not page-by-page processing, not a for-loop splitting pages into individual tasks, and not an external scheduler stitching results together. It's a true single-inference document parse across dozens of pages.
On OmniDocBench V1.5, the mainstream benchmark for document parsing, Unlimited OCR achieved a state-of-the-art score of 93.23% — a full 6 percentage points higher than DeepSeek OCR.
2 The Page-by-Page Amnesia Problem
Current OCR models are, as Gao Dalie puts it, "surprisingly bad" at long documents. They break a continuous task into dozens of unrelated smaller tasks, process one page, clear the memory, then start the next page from scratch. An external scheduler then stitches results together — a stopgap engineering measure that's far from true intelligence.
The root cause is the KV (key-value) cache under the standard attention mechanism. As output length grows, the KV cache expands exponentially:
- Memory pressure — the GPU runs out of VRAM as the cache grows with each generated token
- Speed degradation — inference gets progressively slower with longer outputs
- Forced page splitting — models are architecturally compelled to process page-by-page, losing cross-page context
This leads to recurring failures in real-world documents: tables split across two pages, missing headings, and incorrect reading order — all because the model "forgets" everything from previous pages.
3 Soft Forgetting — Learning from Human Cognition
Gao Dalie draws a compelling analogy to how humans actually process long documents. When copying a book, a human maintains three cognitive anchors:
- The original text — the full source document is always visible
- The recent output — the short paragraph just written
- The next word — immediate focus on what to write next
Earlier writings gradually fade from active memory, while recent context is used to maintain continuity. This cognitive ability has a formal name: "soft forgetting" — the ability to forget what should be forgotten while retaining what's needed for the current task.
This is what allows humans to sustain extremely long tasks with very low cognitive load: copying books, translating hundreds of pages, continuously transcribing audio for hours. Baidu's approach is to encode this exact human attention pattern into the model architecture.
4 Demo: Formula & Table Recognition
Gao Dalie tests Unlimited OCR on four key challenges using the live chatbot. The first two results are impressive:
Formula Recognition
Complex mathematical formulas with superscripts, subscripts, and long intricate expressions are handled exceptionally well. The model accurately interprets nested mathematical notation — a traditionally difficult OCR task where even small errors compound.
Table Recognition
Tables are notoriously difficult for OCR — they come in many formats (bordered, borderless), contain dense numbers that are easy to misinterpret, and have complex alignment requirements. Gao Dalie tests several table examples and reports the accuracy is "genuinely impressive".
5 Demo: Reading Order & Handwriting Limitations
Reading Order ✅
Modern documents don't follow simple top-to-bottom, left-to-right flow. They have multi-column designs, mixed text and images, folds, color printing, tilted scans, and handwritten annotations. Unlimited OCR's technical report demonstrates the model can understand these complex structures "almost like a human" — intelligently analyzing layout and restoring reading order across academic papers, multi-column newspapers, and technical reports.
Handwriting ❌
This is where Unlimited OCR struggles. In Gao Dalie's testing:
- Extraction was fast but accuracy was noticeably lower than expected
- For handwritten notes with mixed elements (text, numbers, paragraphs, images, multi-column layouts), the model missed content and produced incorrect text
- Difficulty preserving original structure — output required significant manual correction
- Not reliable enough for complex handwritten documents
6 The Sliding Window Architecture
To understand what makes Unlimited OCR architecturally different, Gao Dalie walks through the typical AI document processing pipeline:
- A PDF arrives
- An OCR engine processes it page by page
- A second step reconstructs the pages into a single text
- The text is indexed into a vector database for RAG
Each stage adds delays and points of failure — tables split across pages, missing headings, incorrect reading order.
Unlimited OCR's approach is fundamentally different: the model maintains the entire document as context (the full input is visible at all times), but during text generation, it only moves forward with a sliding window of already-generated text.
- Conventional decoders — working memory increases linearly with each output token, creating a bottleneck on long documents
- Unlimited OCR — keeps the window of generated text constant, turning long document analysis into continuous reading from beginning to end rather than a reconstruction process
For teams building document pipelines, this means: less preprocessing, less stitching code, and more consistent text passed to RAG.
7 Unlimited OCR vs DeepSeek OCR — Two Sides of the Same Coin
Gao Dalie makes a fascinating observation: Unlimited OCR and DeepSeek OCR aren't really competitors — they're tackling two different ends of the same technical route:
- DeepSeek OCR — addresses the input side: how to compress high-resolution documents into as few visual tokens as possible (encoding)
- Unlimited OCR — addresses the output side: how to prevent the model from being overwhelmed by an ever-expanding KV cache during long-term generation (decoding)
When viewed together, they're "surprisingly interconnected" — one optimizes how you see the document, the other optimizes how you write about it.
A telling detail: the Unlimited OCR technical report references DeepSeek OCR 40 times. Gao Dalie notes that in many places, it doesn't read like a typical competitor comparison, but rather like it's "continuing the line of thought and pushing it forward" — hinting at a possible intellectual lineage between the two projects.
8 Practical Implications — MIT License & RAG Pipelines
Unlimited OCR isn't the first OCR model based on a visual language model, but it tackles the right problem in the right way. Analyzing long documents has long been a weakness of RAG pipelines, and single-pass reading without splitting and stitching eliminates a source of recurring errors.
The practical package makes it immediately usable:
- MIT license — fully open for commercial use
- 3 billion parameters — small enough to run on consumer hardware
- Freely downloadable weights — no API dependency
- 500M active parameters at inference — efficient MoE architecture keeps compute costs low
This makes it a concrete candidate for anyone building document systems — from freelancers to professional firms — rather than a research artifact locked behind API calls.
🎯 Key Takeaways
🔑 Key Takeaways
- Single-pass document reading — Unlimited OCR processes entire books in one forward inference, eliminating page-by-page splitting and stitching for the first time
- 93.23% on OmniDocBench V1.5 — state-of-the-art, six percentage points above DeepSeek OCR on the mainstream document parsing benchmark
- 3B params, 500M active — Mixture-of-Experts architecture keeps the model efficient at inference while maintaining a large total parameter count
- Sliding window decoder — keeps generated-text memory constant regardless of output length, solving the KV cache explosion that forces other models into page-by-page processing
- "Soft forgetting" — inspired by human cognition: see the full source, remember only recent output, let earlier content fade from active memory
- Excellent on formulas, tables, and complex layouts — accurate on superscripts/subscripts, bordered/borderless tables, multi-column designs, and tilted scans
- Weak on handwriting — handwritten notes with mixed elements produce unreliable results requiring manual correction
- Complements DeepSeek OCR — DeepSeek optimizes the input (visual token compression), Unlimited OCR optimizes the output (KV cache management). Together they address both ends of the document AI pipeline
- Direct RAG impact — less preprocessing, less stitching code, more consistent reconstructed text passed to vector databases
- MIT license + downloadable weights — fully open-source, commercially usable, no API dependency required
🔗 Resources & Links
- Unlimited OCR on Hugging Face — model weights and documentation
- PaddleOCR (GitHub) — Baidu's open-source OCR framework