Most OCR pipelines fall apart on long documents. You crop, you page, you stitch, and somewhere in the seams the formatting gets lost. Baidu’s Unlimited-OCR takes a different swing: feed it a whole document — a single image, a stack of pages, or a PDF — and let one model read the lot in a single pass.

The model card puts it plainly: it aims to “push Deepseek-OCR one step further” and “Welcome the Era of One-shot Long-horizon Parsing.” Below is what the card actually gives you.
What it is
- 3 billion parameters, BF16, shipped as Safetensors
- A multimodal transformer — vision encoder plus language head — built for document understanding, not just character recognition
- MIT licensed, so it drops into commercial work without friction
- Announced June 22, 2026; paper on arXiv (
2606.23050) the next day, June 23, 2026
The point isn’t just reading text off a page. It parses structure — headings, tables, layout — and can emit bounding boxes via <|det|> markers, so you know where each chunk came from, not only what it says.
Two modes
The model runs in two configurations, and the difference is mostly about how it handles image size and cropping:
| Mode | base_size | image_size | crop_mode |
|---|---|---|---|
| Gundam | 1024 | 640 | on |
| Base | 1024 | 1024 | off |
Gundam crops the page into tiles before reading — better for dense, high-resolution documents where detail matters. Base takes the page whole at full resolution. Start with Gundam for real-world scans; switch to Base when the layout is simple.
Capabilities
- Single-image and multi-page document processing
- PDF support (converted to images under the hood)
- Bounding-box detection alongside extracted text
- Formatting preservation across the whole document
- Streaming inference and a no-repeat n-gram guard (
ngram_size=35) — which matters on long output, where models love to loop - Described as multilingual, tested across varied document types
The numbers
- Mean score: 46.17
- Text Content: 86.81
- Text Formatting: 0.97
The content score is strong — it reads the words well. The formatting score is where the honesty lives: structural fidelity is still the hard part, and this benchmark says there’s room. Read that as “great at pulling text, still maturing at reconstructing exact layout.”
Running it
Standard transformers load. Needs a CUDA GPU and trust_remote_code=True, since the inference logic ships with the model:
| |
Note the max_length=32768 — a long output budget is the whole reason this thing exists. A page of dense text plus bounding boxes plus formatting tokens adds up fast, and this is what keeps it from getting cut off mid-document.
Where it fits
If you’re building anything that eats real documents — invoices, contracts, scanned reports, multi-page forms — the usual move is a chain of tools: a detector, an OCR engine, a layout parser, a stitcher. Unlimited-OCR collapses that into one model call. At 3B parameters it’s small enough to self-host on a single modern GPU, and MIT licensing means no legal asterisk on the output.
The formatting benchmark says don’t expect pixel-perfect table reconstruction yet. But for “read this whole document and give me the text and where it lives,” in one pass, it’s a genuinely different shape of tool than the crop-and-stitch pipelines it’s trying to replace.
All facts and figures here come from the official model card. Read the original at huggingface.co/baidu/Unlimited-OCR.