Every mainstream OCR pipeline makes the same trade-off: chop the document into pages, process each one separately, then stitch the results back together. It works, mostly. But it loses cross-page context, breaks tables that span page boundaries, and gets expensive fast when cloud providers charge per page.
Baidu's research team just shipped an alternative. Unlimited-OCR is a 3-billion-parameter open-source model that parses entire documents — dozens of pages — in a single forward pass, maintaining context across the whole document without any page-splitting logic.
The Technical Bet: One Pass, Constant Cache
The core innovation is an attention mechanism called Recurrent Sliding Window Attention (R-SWA). Standard attention mechanisms scale memory usage with document length, which is why existing tools are forced to chunk documents into pages. R-SWA keeps a constant KV cache regardless of input length, which is what makes a 32K-token context window practical on a model this size.
The result: a single forward pass processes what other tools handle in dozens of sequential steps. For multi-page PDFs — contracts, research papers, dense financial filings — this means the model can see a reference on page 3 when it's parsing a footnote on page 18. Existing page-by-page pipelines cannot do that by design.
Unlimited-OCR is built on the DeepSeek-OCR lineage, using a Mixture-of-Experts architecture. Baidu explicitly positions it as a continuation of the DeepSeek-OCR research direction, pushing document understanding further than the base model achieved.
What You Actually Need to Run It
This is a locally-deployable model, not a cloud API. The hardware requirements are real but accessible for most developers already running inference workloads:
- GPU: NVIDIA GPU with 8GB+ VRAM (consumer cards like the RTX 3070 or 4060 qualify)
- Inference frameworks: Compatible with
transformers,vllm, andsglang - Operating system: Standard Linux setup with CUDA support
For teams already running models like those covered in AirLLM's layer-by-layer inference approach, the infrastructure lift here is minimal. If you can run a mid-sized open-weight model, you can run Unlimited-OCR.
Why This Matters for the Economics of Document Processing
Cloud OCR services — AWS Textract, Google Cloud Vision, Azure Document Intelligence — all bill per page. A 200-page contract runs through these pipelines as 200 separate API calls. For enterprises processing thousands of documents monthly, that arithmetic gets uncomfortable quickly.
Unlimited-OCR runs on your own hardware, with zero per-page cost after setup. For high-volume document workflows — legal discovery, financial data extraction, research digitization — the economics shift completely. The trade-off is infrastructure ownership versus managed-service convenience, which is a familiar calculus for any team already running local inference.
This is also consistent with a broader pattern from Chinese AI labs: release capable, production-ready open models that undercut the per-unit pricing of Western cloud incumbents. DeepSeek V4's push to run entirely on Huawei hardware follows the same logic at the infrastructure level — minimize dependence on foreign APIs and services by building vertically.
How It Fits Into the Open-Weight Moment
Unlimited-OCR isn't an LLM competing for reasoning benchmarks. It's a narrow, task-specific model doing one thing extremely well: reading documents at scale without the architectural compromises that every competing tool accepts as inevitable.
The open-weight model landscape has been expanding rapidly. Thinking Machines' 975B Inkling model and Shanghai AI Lab's 397B InternS2 represent the frontier of open general-purpose reasoning. Unlimited-OCR belongs to a different category: open specialist models that make specific enterprise workflows genuinely self-hostable for the first time.
The distinction matters. A team processing legal documents doesn't need a frontier reasoning model — they need reliable, cost-effective extraction that preserves document structure. A 3B parameter model optimized for that task, running locally, solves the actual problem.
Getting Started
The full model weights, code, and documentation are available on GitHub at github.com/baidu/Unlimited-OCR. The repo includes integration examples for all three supported inference frameworks.
For developers already familiar with vllm or sglang deployments, the setup path mirrors standard open-weight model deployment. The 8GB VRAM floor means most modern consumer and workstation GPUs qualify without quantization.
Related Reading
- 70B LLMs on 4GB VRAM — AirLLM's Layer-by-Layer Trick That Rewrites the Rules
- DeepSeek V4 Runs on Zero Nvidia Silicon — and Huawei's Biggest Chip System Debuts Tomorrow
- 975B Parameters, Full Weights, Free to Fine-Tune — Thinking Machines Just Changed the Open Model Race
- Shanghai AI Lab's 397B Open Model Tops MMLU-Pro — and Beats GPT-5.5 on Code