SAVRN
Search Contact SAVRN

Open-weight model · Image and text to text

unlimited-ocr-max

by Konstantin kthierbach/unlimited-ocr-max

baidu/Unlimited-OCR as one repository max serve opens directly on Apple Silicon: baidu's weights unchanged (model.safetensors, byte-identical to upstream at revision 07dea832e22aefee32ad281d4b80551282e1c168, sha256…

Parameters3.3B
Context32,768
Weights11.0 GB
Licensemit
AccessOpen weights
Monthly Downloads56

Runs On

What it takes to serve unlimited-ocr-max (3.3B parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 6.7 GB 8.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 3.3 GB 4.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 1.7 GB 2.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.

Model Card

By Konstantin, published under mit, revision 7e70ab34f8a0.

baidu/Unlimited-OCR as one repository max serve opens directly on Apple Silicon: baidu's weights unchanged (model.safetensors, byte-identical to upstream at revision 07dea832e22aefee32ad281d4b80551282e1c168, sha256 2bc48a7a110061ea58fff65d3169367eebe3aee371ca6968dc2219c1b2855fc6), the tokenizer files as published, and the checkpoint's config.json with two keys removed (automap, modeltype) so MAX can load it without trustremotecode. The runtime is a MAX custom architecture with two Mojo custom ops, served from https://github.com/kthr/unlimited-ocr-max as an OpenAI-compatible endpoint on the Metal GPU or the CPU. The repository also carries model-int8.safetensors, this port's weight-only int8…

Read Konstantin's full model card

Unlimited-OCR, served through MAX

baidu/Unlimited-OCR as one repository max serve opens directly on Apple Silicon: baidu's weights unchanged (model.safetensors, byte-identical to upstream at revision 07dea832e22aefee32ad281d4b80551282e1c168, sha256 2bc48a7a110061ea58fff65d3169367eebe3aee371ca6968dc2219c1b2855fc6), the tokenizer files as published, and the checkpoint's config.json with two keys removed (auto_map, model_type) so MAX can load it without trust_remote_code. The runtime is a MAX custom architecture with two Mojo custom ops, served from https://github.com/kthr/unlimited-ocr-max as an OpenAI-compatible endpoint on the Metal GPU or the CPU. The repository also carries model-int8.safetensors, this port's weight-only int8 quantisation of the same checkpoint (symmetric per-group G=128, routed experts only).

Install and serve

uv tool install unlimited-ocr-max
unlimited-ocr-max serve --devices gpu                 # bf16: downloads model.safetensors once (6.2 GiB)
unlimited-ocr-max serve --devices gpu --weights int8  # int8: 4.0 GiB download, faster decode

pip install unlimited-ocr-max into a venv is the equivalent. No extra index: the exact max[all]==26.6.0 pin is the stable release, on PyPI with the mojo it depends on. --devices cpu is supported (slow).

--revision defaults to v0.3.0, the tag of this repository the package version was validated against — keep it: a fixed package version then resolves fixed weights, config and tokenizer, so a later push here cannot silently falsify the fidelity claims below. Offline route: hf download kthierbach/unlimited-ocr-max --revision v0.3.0 --local-dir <dir> once, then serve --model <dir>. (A local copy of baidu/Unlimited-OCR itself cannot be served this way — its config.json demands remote code; use this repository.) Requests go to http://127.0.0.1:8010/v1/chat/completions as one image plus <|grounding|>Convert the document to markdown., temperature 0; the no-repeat-n-gram guard defaults to the model's own 35.

Prerequisites

  • macOS on Apple Silicon, 24 GB unified memory recommended. Startup compilation can peak near 16–20 GiB resident on a cold compile cache; steady serving sits far lower (table below). Built-in guards refuse to start below 16 GiB obtainable RAM (exit 97) and kill past a 21 GiB budget or 16 GiB swap growth (exit 99). One model process at a time.
  • --devices gpu needs full Xcode + the Metal Toolchain (xcodebuild -downloadComponent MetalToolchain) — MAX compiles Metal kernels through xcrun metallib, which the Command Line Tools do not ship.
  • Python 3.12/3.13; Hub access on first run (weights cached).

Fidelity and performance

Measured 2026-09-18 on max==26.6.0 (stable) / Mojo 1.1.0, Apple M4 24 GB, macOS 26.5.2, over the twelve-page benchmark corpus, temperature 0, default guard, one draw per arm; served code byte-identical to v0.3.0. The reference is the vendored PyTorch implementation (fp32, CPU, transformers 4.46.3).

PyTorch reference (in-process, CPU) bf16 (GPU served) int8 (GPU served)
steady decode T/sec (= 1000 / step median) 27.09 19.86 36.44
decode-step median ms [n samples] 36.92 (per-step stamps) 50.36 [102] (scheduler) 27.44 [60] (scheduler)
decode-step floor ms 36.69 (per-page) 44.51 24.79
prefill (CE) median s — (TTFT 5.50) 4.98 6.92
steady resident GiB between requests 1.7–2.0 8.0–8.2
text identity vs the reference, of 12 pages baseline 12/12 byte-identical 6/12
corpus character error rate 0 0 0.0011241

int8's divergence is 27 edited characters of 24 019 — every one a bounding-box digit (±1–2 px), none a word, none document structure — for 1.8× bf16's decode rate and a 4.0 GiB download. bf16's low steady residency comes from v0.3.0's device-weight registry (one shared device copy of the language weights; the earlier ~10 s per-request graph reload is gone below the scheduler's measurement tick). int8 deliberately does not share weights — a served gate showed the registry corrupts int8 output — so it keeps host copies and the higher steady residency. Method, per-page rows and the void rules are in the code repository's BENCHMARKS.md and changelog.

Not supported

  • gundam mode (dynamic tiling) is not served — base mode only.
  • Batch size > 1 (the prefill graph's sequence length is static).
  • Multi-GPU.

References

The model is described in Unlimited OCR Works (Yin et al., 2026), arXiv:2606.23050. This repository changes how the model is served, not the model (int8 is the one exception, and its divergence is quantified above). Model-level behaviour, limitations and biases are those of baidu/Unlimited-OCR.

@misc{yin2026unlimitedocrworks,
      title={Unlimited OCR Works},
      author={Youyang Yin and Huanhuan Liu and YY and Qunyi Xie and Chaorun Liu and Shiqi Yang and Shaohua Wang and Zhanlong Liu and Hao Zou and Jinyue Chen and Shu Wei and Jingjing Wu and Mingxin Huang and Zhen Wu and Guibin Wang and Tengyu Du and Lei Jia},
      year={2026},
      eprint={2606.23050},
      archivePrefix={arXiv}
}

Authorship

This port, its serve configuration and this card were written with substantial AI assistance (Claude, via Claude Code); Konstantin Thierbach reviewed them and is accountable for their contents. Assisted-by: AI.

License

MIT — see LICENSE in this repository: this port's MIT notice and baidu's MIT notice verbatim. The bf16 weights, tokenizer files and config.json are baidu's, from baidu/Unlimited-OCR (MIT, Copyright (c) 2026 Baidu), redistributed under that license; the bf16 weights are unchanged, config.json has two keys removed, and model-int8.safetensors is derived from those weights by this port's quantiser.

Configuration

Architecture
UnlimitedOCRForCausalLM
Context length (tokens)
32,768
Layers
12
Hidden size
1,280
Feed-forward size
6,848
Attention heads
10
Key/value heads
10
Vocabulary size
129,280
Routed experts
64
Experts active per token
6
Sliding window (tokens)
128
Stored precision
bfloat16

Identity and Version

Repository
kthierbach/unlimited-ocr-max
Publisher
Konstantin
Task
Image and text to text
Modality
Image and text
Library
Not stated by the source
Parameters
3.3B parameters
Languages
max, ocr, moe
Revision
7e70ab34f8a00b697879a4b68e2ae0a14f13ef3e
First published
2026-09-03
Last updated
2026-09-18

Files and Weights

9 files, 11.0 GB in total. The weights are 2 files totalling 11.0 GB in safetensors.

Weights2 files · 11.0 GB
Configuration2 files · 3.5 KB
Tokenizer2 files · 10.1 MB
Documentation2 files · 8.8 KB
Repository1 file · 50 B
Every file
FileTypeSizeSHA-256
model-int8.safetensorsWeights4.3 GB 5ec181ad207c
model.safetensorsWeights6.7 GB 2bc48a7a1100
config.jsonConfiguration2.7 KB
special_tokens_map.jsonConfiguration801 B
LICENSEDocumentation2.5 KB
README.mdDocumentation6.3 KB
.gitattributesRepository50 B
tokenizer.jsonTokenizer10.0 MB
tokenizer_config.jsonTokenizer165.9 KB

License and Download

License
mit
Access
Open weights, no gate
Download size
11.0 GB
Download from Konstantin

Released by Konstantin through its official repository on Hugging Face. Read the license.

Built From

  • Described by arXiv:2606.23050

Memory Requirements

PrecisionWeights in memory
As published11.0 GB
16-bit6.7 GB
8-bit3.3 GB
4-bit1.7 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About unlimited-ocr-max

How much GPU memory does unlimited-ocr-max need?

About 8 GB at 16-bit and 2 GB at 4-bit: the weights (3.3B parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run unlimited-ocr-max on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use unlimited-ocr-max commercially?

Yes. unlimited-ocr-max is released under MIT License. The MIT License is a short permissive license. It permits commercial use, modification and redistribution, provided the copyright notice and permission notice are included.

What is unlimited-ocr-max's context length?

32,768 tokens, from the maximum position embeddings in its published configuration.

Similar Models

Model · Image and text to text

DeepSeek-OCR

DeepSeek

Inference using Huggingface transformers on NVIDIA GPUs. Requirements tested on python 3.12.9 + CUDA11.8: Refer to GitHub for guidance on model inference acceleration and PDF processing, etc. [2025/10/23] DeepSeek-OCR is now officially supported in upstream vLLM. We would like to thank Vary, GOT-OCR2.0, MinerU, PaddleOCR, OneChart, Slow Perception for their valuable models and ideas. author={Wei, Haoran and Sun, Yaofeng and Li, Yukun}, year={2025}

Open weights mit 3.3B parameters 8,192 tokens transformers

Model · Image and text to text

Unlimited-OCR

BAIDU

[2026/07/21] Thanks to the ms-swift community for their support, our model now supports training with ms-swift. - [2026/07/03] Thanks to the Baidu Cloud team for their support. Our model is now available on Baidu Cloud. - [2026/06/28] Thanks to the vLLM community and Tianyu Guo for their support, our model now supports vLLM inference. - [2026/06/24] Thanks to AK for creating a demo for us. It is now available at Hugging Face Spaces. - [2026/06/23] Our paper is now available on arXiv. - [2026/06/23] Thanks to the ModelScope community for their support. Our model is now available at ModelScope. - [2026/06/22] We present Unlimited-OCR, aiming to push Deepseek-OCR one step further. Inference…

Open weights mit 3.3B parameters 32,768 tokens transformers

Model · Image and text to text

Unlimited-OCR-AWQ

Sahil Chachra

AWQ 4-bit (W4A16) quantization of baidu/Unlimited-OCR, a 3B vision-language OCR model that pushes DeepSeek-OCR one step further (one-shot, long-horizon document parsing). This repo quantizes the DeepSeek-V2 MoE text decoder with activation-aware scaling (AWQ) while keeping the vision tower in BF16, so it stays a drop-in transformers model. Unlimited-OCR uses the DeepSeek-OCR prompt vocabulary. The prompt must contain; prefix it with whenever you also want bounding boxes for what was read. - base — basesize=1024, imagesize=1024, cropmode=False. Good default for normal pages. - gundam — basesize=1024, imagesize=640, cropmode=True. Tiles the page; use for dense or large/high-resolution…

Open weights mit 3.4B parameters 32,768 tokens transformers

Model · Image and text to text

DeepSeek-OCR-2

DeepSeek

Inference using Huggingface transformers on NVIDIA GPUs. Requirements tested on python 3.12.9 + CUDA11.8: Refer to GitHub for guidance on model inference acceleration and PDF processing, etc. We would like to thank DeepSeek-OCR, Vary, GOT-OCR2.0, MinerU, PaddleOCR for their valuable models and ideas. We also appreciate the benchmark OmniDocBench. author={Wei, Haoran and Sun, Yaofeng and Li, Yukun}, year={2025} title={DeepSeek-OCR 2: Visual Causal Flow}, author={Wei, Haoran and Sun, Yaofeng and Li, Yukun}, year={2026}

Open weights apache-2.0 3.4B parameters 8,192 tokens transformers

Model · Image and text to text

dots.ocr

Dots Studio

dots.ocr: Multilingual Document Layout Parsing in a Single Vision-Language Model dots.ocr is a powerful, multilingual document parser that unifies layout detection and content recognition within a single vision-language model while maintaining good reading order. Despite its compact 1.7B-parameter LLM foundation, it achieves state-of-the-art(SOTA) performance. 1. Powerful Performance: dots.ocr achieves SOTA performance for text, tables, and reading order on OmniDocBench, while delivering formula recognition results comparable to much larger models like Doubao-1.5 and gemini2.5-pro. 2. Multilingual Support: dots.ocr demonstrates robust parsing capabilities for low-resource languages…

Open weights mit 3B parameters 131,072 tokens dots_ocr

Model · Image and text to text

dots.mocr

Dots Studio

dots.mocr We present dots.mocr. Beyond achieving state-of-the-art (SOTA) performance in standard multilingual document parsing among models of comparable size, dots.mocr excels at converting structured graphics (e.g., charts, UI layouts, scientific figures and etc.) directly into SVG code. Its core capabilities encompass grounding, recognition, semantic understanding, and interactive dialogue. Simultaneously, we are releasing dots.mocr-svg, a variant specifically optimized for robust image-to-SVG parsing tasks. More information can be found in the paper. Visual languages (e.g., charts, graphics, chemical formulas, logos) encapsulate dense human knowledge. dots.mocr unifies the…

Open weights mit 3B parameters 131,072 tokens dots_mocr