Instructions to use AtomicChat/Unlimited-OCR-2-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use AtomicChat/Unlimited-OCR-2-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 AtomicChat/Unlimited-OCR-2-GGUF:Q6_K # Run inference directly in the terminal: llama cli -hf AtomicChat/Unlimited-OCR-2-GGUF:Q6_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf AtomicChat/Unlimited-OCR-2-GGUF:Q6_K # Run inference directly in the terminal: llama cli -hf AtomicChat/Unlimited-OCR-2-GGUF:Q6_K
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 AtomicChat/Unlimited-OCR-2-GGUF:Q6_K # Run inference directly in the terminal: ./llama-cli -hf AtomicChat/Unlimited-OCR-2-GGUF:Q6_K
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 AtomicChat/Unlimited-OCR-2-GGUF:Q6_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf AtomicChat/Unlimited-OCR-2-GGUF:Q6_K
Use Docker
docker model run hf.co/AtomicChat/Unlimited-OCR-2-GGUF:Q6_K
- Llama new
- LM Studio
- Jan
- vLLM
How to use AtomicChat/Unlimited-OCR-2-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AtomicChat/Unlimited-OCR-2-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": "AtomicChat/Unlimited-OCR-2-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/AtomicChat/Unlimited-OCR-2-GGUF:Q6_K
- Ollama
How to use AtomicChat/Unlimited-OCR-2-GGUF with Ollama:
ollama run hf.co/AtomicChat/Unlimited-OCR-2-GGUF:Q6_K
- Unsloth Desktop
- Docker Model Runner
How to use AtomicChat/Unlimited-OCR-2-GGUF with Docker Model Runner:
docker model run hf.co/AtomicChat/Unlimited-OCR-2-GGUF:Q6_K
- Lemonade
How to use AtomicChat/Unlimited-OCR-2-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull AtomicChat/Unlimited-OCR-2-GGUF:Q6_K
Run and chat with the model
lemonade run user.Unlimited-OCR-2-GGUF-Q6_K
List all available models
lemonade list
- Atomic Chat
Unlimited-OCR-2 GGUF
GGUF builds of baidu/Unlimited-OCR-2, Baidu's 3.3B mixture-of-experts model that turns document page images (scans, photos, PDF pages) into text with layout, by AtomicChat.
These files need llama.cpp with Unlimited-OCR-2 support, which mainline llama.cpp does not have yet. v2 uses a page-aware 2D RoPE and SR-SWA (DASH) routed attention. Build llama.cpp
b11913(commit7aca0d2ea8) with the community patchunlimited-ocr2.patchfrom RX5950XT/Unlimited-OCR-2-GGUF (sha256dcdac02ede443987…). Mainline llama.cpp and apps built on it cannot load these files.
mmproj-Unlimited-OCR-2-F16.ggufis the vision encoder (SAM + CLIP); every text file needs it.- The DASH router (
indexer.*tensors) stays BF16 in every file, so routing follows the original. - The embedded chat template puts
<PAGE>before every image and adds the trained instruction (Multi page parsing.) when a message has no text, so chat clients andllama-serverwork without a special prompt. - Atomic Chat support: in progress (AtomicBot-ai/atomic-llama-cpp-turboquant#96).
Files
| File | Size on disk | Pages within 1% of the original's text | Character difference vs the original: median / mean | Difference vs BF16 GGUF | Role |
|---|---|---|---|---|---|
Unlimited-OCR-2-BF16.gguf |
5.88 GB | 24/30 | 0.05% / 2.94% | 0.00% | full precision |
Unlimited-OCR-2-Q8_0.gguf |
3.13 GB | 23/30 | 0.12% / 2.57% | 1.11% | recommended |
Unlimited-OCR-2-AD-Q6_K.gguf |
2.74 GB | 24/30 | 0.08% / 2.27% | 0.72% | smaller, near Q8_0 |
Unlimited-OCR-2-AD-Q5_K.gguf |
2.28 GB | 23/30 | 0.08% / 3.36% | 0.52% | smaller |
Unlimited-OCR-2-AD-Q4_K.gguf |
2.02 GB | 24/30 | 0.08% / 2.94% | 0.07% | smallest |
Measured on 30 real pages from OmniDocBench (2 per category: textbooks, newspapers, slides, reports, notes, exams, books, magazines, papers and more; seed 0), one page per request. The reference is the original model in BF16 with the vendor's own code (transformers). Character difference = edit distance of the recognized text after removing layout headers (block type and box), divided by the original's length; lower is better. The BF16 row is the gap between the patched llama.cpp and the vendor code; the quantized files add little to it (last column).
That gap comes from near-ties, not from a wrong port. When the BF16 GGUF's output is forced through the original
model, the original's own top choice agrees with the llama.cpp token on 98.8% of 34,926 steps on these pages, and
almost all differences are bfloat16 near-ties (logit gap above 1 on 33 steps). An early near-tie in the layout,
such as a block labelled image or table or a box shifted by a pixel, then changes the rest of the page.
How the AD files are built
- Attention, shared experts, the dense FFN of layer 0, token embeddings and the output head: Q8_0.
- Routed experts (about nine tenths of the weights): gate/up at the file's type (Q6_K, Q5_K, Q4_K).
ffn_down_expsrows are 896 wide, not a multiple of 256, so K-quants cannot be used there (llama-quantize would silently swap the type). They are set explicitly to Q8_0, Q5_1 and Q5_0.- No importance matrix yet.
Run
git clone https://github.com/ggml-org/llama.cpp && cd llama.cpp && git checkout b11913
hf download RX5950XT/Unlimited-OCR-2-GGUF llama.cpp-patch/unlimited-ocr2.patch --local-dir .
git apply llama.cpp-patch/unlimited-ocr2.patch
cmake -B build -DGGML_CUDA=ON && cmake --build build --config Release -j --target llama-mtmd-cli llama-server
./build/bin/llama-mtmd-cli -m Unlimited-OCR-2-Q8_0.gguf --mmproj mmproj-Unlimited-OCR-2-F16.gguf \
--jinja --temp 0 -c 32768 -n 8000 --image page.png -p "<PAGE><__media__>Multi page parsing."
# or as an OpenAI-compatible server: send a page image (text optional), temperature 0
./build/bin/llama-server -m Unlimited-OCR-2-Q8_0.gguf --mmproj mmproj-Unlimited-OCR-2-F16.gguf \
--jinja -np 1 -c 32768
Drop -DGGML_CUDA=ON without an NVIDIA GPU (Metal is used on Mac automatically).
Limits
- The patch derives page positions from the token history of one sequence: run one request at a time (no parallel server slots).
- Measured on single pages. Multi-page documents are not measured here yet.
- The file format follows the community patch. If mainline llama.cpp adds v2 with different keys, we will convert again.
License
MIT, inherited from baidu/Unlimited-OCR-2. llama.cpp v2 support: patch by RX5950XT. Built by AtomicChat.
- Downloads last month
- -
6-bit
8-bit
16-bit
Model tree for AtomicChat/Unlimited-OCR-2-GGUF
Base model
baidu/Unlimited-OCR-2