Instructions to use 42ailab/Unlimited-OCR-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use 42ailab/Unlimited-OCR-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="42ailab/Unlimited-OCR-GGUF", filename="Unlimited-OCR-3B-Q4_K_M.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use 42ailab/Unlimited-OCR-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf 42ailab/Unlimited-OCR-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf 42ailab/Unlimited-OCR-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf 42ailab/Unlimited-OCR-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf 42ailab/Unlimited-OCR-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf 42ailab/Unlimited-OCR-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf 42ailab/Unlimited-OCR-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf 42ailab/Unlimited-OCR-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf 42ailab/Unlimited-OCR-GGUF:Q4_K_M
Use Docker
docker model run hf.co/42ailab/Unlimited-OCR-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use 42ailab/Unlimited-OCR-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "42ailab/Unlimited-OCR-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "42ailab/Unlimited-OCR-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/42ailab/Unlimited-OCR-GGUF:Q4_K_M
- Ollama
How to use 42ailab/Unlimited-OCR-GGUF with Ollama:
ollama run hf.co/42ailab/Unlimited-OCR-GGUF:Q4_K_M
- Unsloth Studio
How to use 42ailab/Unlimited-OCR-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for 42ailab/Unlimited-OCR-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for 42ailab/Unlimited-OCR-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for 42ailab/Unlimited-OCR-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use 42ailab/Unlimited-OCR-GGUF with Docker Model Runner:
docker model run hf.co/42ailab/Unlimited-OCR-GGUF:Q4_K_M
- Lemonade
How to use 42ailab/Unlimited-OCR-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull 42ailab/Unlimited-OCR-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Unlimited-OCR-GGUF-Q4_K_M
List all available models
lemonade list
Unlimited-OCR-3B · Fully Local Document Recognition
English | 简体中文 · Also on ModelScope · 42ailab.com
Give it a document photo or scan and this model turns the whole page into clean Markdown body text and tables — entirely on your own computer. No cloud, free, private.
The model was built by Baidu and released under MIT (Unlimited-OCR, from the DeepSeek-OCR architecture lineage). This repo is not a new model — we converted that open model into a quantized build (GGUF) that runs offline on your computer and verified its quality. The capability belongs to upstream; what we did was make it run locally.
1. The problem it solves
Turning documents — contracts, invoices, papers, books, scans, screenshots — into editable, searchable, AI-feedable structured text is one of the highest-frequency steps in knowledge work, and many scenarios depend on it:
- Convert to editable documents: turn PDFs, scans and images into Markdown and tables in one step;
- Build retrieval and Q&A: digitize paper material and feed it to an AI for search, summarization and questions;
- Archive complex layouts: multi-column layouts, tables and formulas can be preserved in structured form and edited later.
High-quality document parsing used to require a cloud service — uploading your files to someone else's server, with the privacy and compliance concerns, and possibly the cost, that entails. This model keeps that step entirely local.
2. How it works
The capability comes from Baidu's Unlimited-OCR (DeepSeek-OCR architecture lineage). Its design points:
- Input a document image, output whole-page Markdown body text plus semantic tables.
- Reads the whole page rather than slicing it up: the full page image is first compressed into a small number of "vision tokens", then body text and tables are emitted in one pass following the layout — so structures spanning columns and lines are less likely to get scrambled.
- Accurate and economical: about 3B total parameters, but only around 0.5B are engaged per token (Mixture-of-Experts) — 2.5–3× faster than a dense model of the same class, and manageable on an ordinary computer.
What we did: converted Baidu's open weights into a quantized file (about 2.7 GB), verified that quantization did not degrade quality, and made it run offline across macOS / Windows / Linux; we also kept the same MIT license as upstream.
3. How well it performs
For the full evaluation of the model itself on public document-parsing benchmarks, refer to the upstream paper (arXiv:2606.23050). Here we list only the two checks we ran on the local quantized build — answering "is it still accurate after quantization, and is it fast locally":
| What we verified | Result |
|---|---|
| Quantization fidelity (local quantized output vs the official full-precision reference, character by character) | Character deviation ≈0.16 (CPU) – 0.20 (CUDA), essentially identical |
| Per-page speed (same batch of real documents, against another local OCR model of the same class) | About 6–10 s/page, 2.5–3× faster |
- Quantization cost no quality (our check): comparing the local quantized output against the official full-precision reference implementation character by character gives a deviation of about 0.16 (CPU) to 0.20 (CUDA) — both very low, meaning the quantized build faithfully reproduces the upstream model's capability.
- Fast enough locally (our measurement): on the same batch of real documents, recognition quality is on par with another mainstream local OCR model of the same class, but this model takes about 6–10 s per page, 2.5–3× faster (the MoE architecture activates fewer parameters), and its output is closer to directly usable, clean Markdown.
4. Limitations and what's next
- Decorative vertical text (such as vertically set Japanese headings) and other rare layouts can still be misread — a shared difficulty of this generation of document OCR.
- Apple GPU (Metal): the vision component has a known precision issue on Metal; the 42model engine works around it automatically (vision on CPU, text still Metal-accelerated), so ordinary users need not think about it.
- Next: provide smaller, more memory-efficient quantizations; extend language and layout coverage; track upstream model updates.
5. How to download and use it
This model is packaged for 42model, which is the recommended way to get it:
Desktop app
- Open Model Library → OCR and download Unlimited-OCR;
- Click Start to set it as the current OCR model.
After that, use the OCR feature to turn images into documents.
Files and license
| File | Role |
|---|---|
Unlimited-OCR-3B-Q4_K_M.gguf |
Text decoder |
mmproj-Unlimited-OCR-3B-F16.gguf |
Vision encoder (F16 precision retained) |
Per-file sha256 values are listed on the Files page and can be verified independently.
License: the model itself is Baidu Unlimited-OCR, © Baidu Inc., MIT (official sources: GitHub · Hugging Face · ModelScope · paper). This repo is a GGUF build converted from it and is likewise governed by MIT. By using it you agree to the upstream license terms.
Citation
For the model itself, please cite upstream Baidu Unlimited-OCR (Youyang Yin et al.):
@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},
primaryClass = {cs.CV},
url = {https://arxiv.org/abs/2606.23050}
}
If this repo's GGUF build was useful to you, you may additionally cite:
@misc{yang2026unlimitedocrgguf,
title = {Unlimited-OCR-GGUF: A Local Quantized Build of Baidu's Unlimited-OCR},
author = {Yang, Zhiping},
year = {2026},
howpublished = {\url{https://huggingface.co/42ailab/Unlimited-OCR-GGUF}},
organization = {42ailab},
note = {GGUF quantization and local deployment packaging; the model itself is Baidu Unlimited-OCR (MIT). Contact: contact@42ailab.com}
}
Contact us: contact@42ailab.com
About us
42ailab — an AI research lab exploring the boundaries of intelligence. Grounded in cognitive science, we work toward a deep integration of AI and human intelligence — to truly understand and augment intelligence, carbon-based and silicon-based alike.
42model — a high-performance local inference engine from 42ailab that runs translation, transcription, recognition, chat and coding on your own machine, free and private; with optional cloud compute for fine-tuning your own models and bringing them back to run locally.
- Downloads last month
- 618
4-bit