Unlimited‑OCR is an end‑to‑end optical character recognition (OCR) and document parsing model developed by Baidu, positioned as the model ushering in the “Era of One‑shot Long‑horizon Parsing.” Unlike existing OCR systems, which typically process multi‑page documents page by page in a loop and reset memory between iterations, Unlimited‑OCR can recognize and convert tens of document pages into a structured format in a single forward pass. This fundamental advantage is made possible by the combination of two key architectural solutions: a highly efficient visual encoder, DeepEncoder, with 16× visual token compression, and the innovative R‑SWA attention mechanism, which keeps the KV‑cache size constant throughout the entire decoding process.
The base architecture of the model is inherited from DeepSeek‑OCR and consists of two main components. The visual encoder, DeepEncoder, is a cascaded SAM‑ViT‑B + CLIP‑L architecture that compresses a 1024×1024 image down to just 256 tokens — critical for multi‑page documents because it radically reduces the baseline KV‑cache size. The decoder is built on a MoE (Mixture of Experts) architecture with 3B total parameters and only 500M activated during inference. The model includes 12 hidden layers, 64 routed experts, and 2 shared experts, with a maximum context length of 32,768 tokens.
The main architectural novelty of Unlimited‑OCR is Reference Sliding Window Attention (R‑SWA), which completely replaces standard Multi‑Head Attention (MHA) in the decoder. R‑SWA solves the fundamental problem of linear KV‑cache growth and the slowing of generation as the output sequence lengthens. When generating each new token, R‑SWA computes attention over two groups of tokens: all reference tokens (in the OCR case, these are the visual tokens and the prompt) and a limited number of preceding output tokens (by default a window of 128 tokens, but for complex documents it is recommended to increase it to 1024). Unlike standard Sliding Window Attention (SWA), in R‑SWA the reference tokens are excluded from the cyclic state update and are always present, preventing them from being gradually “washed out” as the window advances. The KV‑cache is implemented as a fixed‑capacity queue of size m + n, where m is the reference tokens and n is the output token window; when each new token is generated, the oldest KV element from the output token group (the n group) is evicted from the queue. As a result, the KV‑cache size remains constant throughout decoding regardless of the length of the output text, ensuring not only predictable memory consumption but also a stable generation speed.
The key advantage of Unlimited‑OCR over other LLM‑based models for OCR tasks is that it solves the KV‑cache overflow problem that previously made it impossible to process multiple pages simultaneously, as well as the problem of decreasing generation speed as decoded tokens accumulate. Moreover, the model not only does not lose quality compared to full attention but also surpasses the baseline DeepSeek‑OCR by 6.22% in the overall metric on the OmniDocBench v1.5 benchmark, achieving 93.23% — first place among all end‑to‑end models, including significantly larger models: GPT‑4o (75.02%), Gemini‑2.5 Pro (88.03%), Qwen2.5‑VL 72B (87.02%), and Qwen3‑VL 235B (89.15%). On the current OmniDocBench v1.6 benchmark, Unlimited‑OCR also holds the top position with a score of 93.92%, demonstrating the best performance in formula recognition (Formula CDM: 95.79%) and table structure extraction (Table TEDS‑S: 93.32%).
The primary use case for Unlimited‑OCR is one‑shot parsing of multi‑page documents. The model can transcribe PDF files, books, scientific articles, and other documents of up to tens of pages in a single pass, without the need for page‑by‑page processing and memory resets. This capability becomes especially relevant when digitizing archives, libraries, legal documents, and solving other OCR tasks where not only accuracy but also the speed of obtaining the final result at scale is important.
Information on how to prompt the model can be found at: https://recipes.vllm.ai/baidu/Unlimited-OCR
| Model Name | Context | Type | GPU | Status | Link |
|---|
There are no public endpoints for this model yet.
Rent your own physically dedicated instance with hourly or long-term monthly billing.
We recommend deploying private instances in the following scenarios:
| Name | GPU | TPS | Max Concurrency | |||
|---|---|---|---|---|---|---|
32,768.0 |
1 | $0.38 | 4.002 | Launch | ||
32,768.0 |
1 | $0.53 | 7.878 | Launch | ||
32,768.0 |
1 | $0.57 | 1.553 | Launch | ||
32,768.0 |
1 | $0.83 | 8.398 | Launch | ||
32,768.0 |
1 | $1.02 | 8.379 | Launch | ||
32,768.0 tensor |
2 | $1.23 | 17.158 | Launch | ||
32,768.0 |
1 | $1.59 | 12.220 | Launch | ||
32,768.0 |
1 | $2.37 | 35.723 | Launch | ||
32,768.0 |
1 | $3.83 | 35.689 | Launch | ||
32,768.0 |
1 | $4.11 | 42.514 | Launch | ||
32,768.0 tensor |
2 | $4.61 | 72.849 | Launch | ||
32,768.0 |
1 | $4.74 | 65.433 | Launch | ||
32,768.0 tensor |
2 | $9.40 | 132.268 | Launch | ||
| Name | GPU | TPS | Max Concurrency | |||
|---|---|---|---|---|---|---|
32,768.0 |
1 | $0.38 | 3.747 | Launch | ||
32,768.0 |
1 | $0.53 | 7.623 | Launch | ||
32,768.0 |
1 | $0.57 | 1.298 | Launch | ||
32,768.0 |
1 | $0.83 | 8.143 | Launch | ||
32,768.0 |
1 | $1.02 | 8.123 | Launch | ||
32,768.0 tensor |
2 | $1.23 | 16.903 | Launch | ||
32,768.0 |
1 | $1.59 | 11.965 | Launch | ||
32,768.0 |
1 | $2.37 | 35.468 | Launch | ||
32,768.0 |
1 | $3.83 | 35.434 | Launch | ||
32,768.0 |
1 | $4.11 | 42.259 | Launch | ||
32,768.0 tensor |
2 | $4.61 | 72.594 | Launch | ||
32,768.0 |
1 | $4.74 | 65.178 | Launch | ||
32,768.0 tensor |
2 | $9.40 | 132.013 | Launch | ||
| Name | GPU | TPS | Max Concurrency | |||
|---|---|---|---|---|---|---|
32,768.0 |
1 | $0.38 | 2.089 | Launch | ||
32,768.0 |
1 | $0.53 | 5.966 | Launch | ||
32,768.0 |
1 | $0.83 | 6.486 | Launch | ||
32,768.0 tensor |
2 | $0.97 | 2.596 | Launch | ||
32,768.0 |
1 | $1.02 | 6.466 | Launch | ||
32,768.0 tensor |
2 | $1.23 | 15.246 | Launch | ||
32,768.0 |
1 | $1.59 | 10.308 | Launch | ||
32,768.0 |
1 | $2.37 | 33.811 | Launch | ||
32,768.0 |
1 | $3.83 | 33.777 | Launch | ||
32,768.0 |
1 | $4.11 | 40.602 | Launch | ||
32,768.0 tensor |
2 | $4.61 | 70.936 | Launch | ||
32,768.0 |
1 | $4.74 | 63.521 | Launch | ||
32,768.0 tensor |
2 | $9.40 | 130.356 | Launch | ||
Contact our dedicated neural networks support team at nn@immers.cloud or send your request to the sales department at sale@immers.cloud.