Unlimited-OCR

multimodal

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


Announce Date: 19.06.2026
Parameters: 4B
Experts: 64
Activated at inference: 500M
Context: 33K
Layers: 12
Attention Type: Reference Sliding Window Attention (R-SWA)
Developer: Baidu, Inc.
Transformers Version: 4.46.3
vLLM Version: >=0.25.0
License: MIT

Public endpoint

Use our pre-built public endpoints for free to test inference and explore Unlimited-OCR capabilities. You can obtain an API access token on the token management page after registration and verification.
Model Name Context Type GPU Status Link
There are no public endpoints for this model yet.

Private server

Rent your own physically dedicated instance with hourly or long-term monthly billing.

We recommend deploying private instances in the following scenarios:

  • maximize endpoint performance,
  • enable full context for long sequences,
  • ensure top-tier security for data processing in an isolated, dedicated environment,
  • use custom weights, such as fine-tuned models or LoRA adapters.

Recommended server configurations for hosting Unlimited-OCR

Prices:
Name GPU Price, hour TPS Max Concurrency
teslaa2-1.16.32.160
32,768.0
1 $0.38 4.002 Launch
teslaa10-1.16.32.160
32,768.0
1 $0.53 7.878 Launch
rtx3080-1.16.32.160
32,768.0
1 $0.57 1.553 Launch
rtx3090-1.16.24.160
32,768.0
1 $0.83 8.398 Launch
rtx4090-1.16.32.160
32,768.0
1 $1.02 8.379 Launch
rtxa5000-2.16.64.160.nvlink
32,768.0
tensor
2 $1.23 17.158 Launch
rtx5090-1.16.64.160
32,768.0
1 $1.59 12.220 Launch
teslaa100-1.16.64.160
32,768.0
1 $2.37 35.723 Launch
h100-1.16.64.160
32,768.0
1 $3.83 35.689 Launch
h100nvl-1.16.96.160
32,768.0
1 $4.11 42.514 Launch
teslaa100-2.24.96.160.nvlink
32,768.0
tensor
2 $4.61 72.849 Launch
h200-1.16.128.160
32,768.0
1 $4.74 65.433 Launch
h200-2.24.256.160.nvlink
32,768.0
tensor
2 $9.40 132.268 Launch
Prices:
Name GPU Price, hour TPS Max Concurrency
teslaa2-1.16.32.160
32,768.0
1 $0.38 3.747 Launch
teslaa10-1.16.32.160
32,768.0
1 $0.53 7.623 Launch
rtx3080-1.16.32.160
32,768.0
1 $0.57 1.298 Launch
rtx3090-1.16.24.160
32,768.0
1 $0.83 8.143 Launch
rtx4090-1.16.32.160
32,768.0
1 $1.02 8.123 Launch
rtxa5000-2.16.64.160.nvlink
32,768.0
tensor
2 $1.23 16.903 Launch
rtx5090-1.16.64.160
32,768.0
1 $1.59 11.965 Launch
teslaa100-1.16.64.160
32,768.0
1 $2.37 35.468 Launch
h100-1.16.64.160
32,768.0
1 $3.83 35.434 Launch
h100nvl-1.16.96.160
32,768.0
1 $4.11 42.259 Launch
teslaa100-2.24.96.160.nvlink
32,768.0
tensor
2 $4.61 72.594 Launch
h200-1.16.128.160
32,768.0
1 $4.74 65.178 Launch
h200-2.24.256.160.nvlink
32,768.0
tensor
2 $9.40 132.013 Launch
Prices:
Name GPU Price, hour TPS Max Concurrency
teslaa2-1.16.32.160
32,768.0
1 $0.38 2.089 Launch
teslaa10-1.16.32.160
32,768.0
1 $0.53 5.966 Launch
rtx3090-1.16.24.160
32,768.0
1 $0.83 6.486 Launch
rtx3080-2.16.32.160
32,768.0
tensor
2 $0.97 2.596 Launch
rtx4090-1.16.32.160
32,768.0
1 $1.02 6.466 Launch
rtxa5000-2.16.64.160.nvlink
32,768.0
tensor
2 $1.23 15.246 Launch
rtx5090-1.16.64.160
32,768.0
1 $1.59 10.308 Launch
teslaa100-1.16.64.160
32,768.0
1 $2.37 33.811 Launch
h100-1.16.64.160
32,768.0
1 $3.83 33.777 Launch
h100nvl-1.16.96.160
32,768.0
1 $4.11 40.602 Launch
teslaa100-2.24.96.160.nvlink
32,768.0
tensor
2 $4.61 70.936 Launch
h200-1.16.128.160
32,768.0
1 $4.74 63.521 Launch
h200-2.24.256.160.nvlink
32,768.0
tensor
2 $9.40 130.356 Launch

Related models

Need help?

Contact our dedicated neural networks support team at nn@immers.cloud or send your request to the sales department at sale@immers.cloud.

We use cookies and web analytics services to ensure the proper functioning of the website, analyze web-site traffic, and improve the quality of our services.
By continuing to use the website, you consent to the Privacy Policy and consent to the processing of cookie files and technical data.