Instructions to use sabafallah/Unlimited-OCR-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use sabafallah/Unlimited-OCR-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="sabafallah/Unlimited-OCR-GGUF", filename="mmproj-unlimited-ocr-bf16.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use sabafallah/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 sabafallah/Unlimited-OCR-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf sabafallah/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 sabafallah/Unlimited-OCR-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf sabafallah/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 sabafallah/Unlimited-OCR-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf sabafallah/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 sabafallah/Unlimited-OCR-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf sabafallah/Unlimited-OCR-GGUF:Q4_K_M
Use Docker
docker model run hf.co/sabafallah/Unlimited-OCR-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use sabafallah/Unlimited-OCR-GGUF with Ollama:
ollama run hf.co/sabafallah/Unlimited-OCR-GGUF:Q4_K_M
- Unsloth Studio
How to use sabafallah/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 sabafallah/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 sabafallah/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 sabafallah/Unlimited-OCR-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use sabafallah/Unlimited-OCR-GGUF with Docker Model Runner:
docker model run hf.co/sabafallah/Unlimited-OCR-GGUF:Q4_K_M
- Lemonade
How to use sabafallah/Unlimited-OCR-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull sabafallah/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 GGUF (for llama.cpp)
GGUF model files for running baidu/Unlimited-OCR in llama.cpp's MTMD (multimodal) support.
Unlimited-OCR is DeepSeek-OCR v1's DeepEncoder + a DeepSeek-V2 MoE decoder, with the decoder attention replaced by R-SWA (Reference Sliding Window Attention). llama.cpp support lands in two stacked PRs (the same GGUF files work for both):
These models are only compatible with the PR branches, not upstream llama.cpp master.
A third PR is independent of the stack and targets master directly:
- max_tiles fix: #25614
The mmproj files were re-uploaded on 2026-07-13 and now carry preproc_max_tiles = 32, matching
the reference implementation. Unlimited-OCR shares DeepSeek-OCR v1's projector type, so without
#25614 llama.cpp ignores the key and falls back to v1's cap of 9 - tall or dense pages are then
split into a coarser tile grid than the reference. Older mmproj files keep working either way.
Download
huggingface-cli download sabafallah/Unlimited-OCR-GGUF --include "unlimited-ocr-bf16.gguf" --local-dir gguf_models/baidu
huggingface-cli download sabafallah/Unlimited-OCR-GGUF --include "mmproj-unlimited-ocr-bf16.gguf" --local-dir gguf_models/baidu
Run example
llama-mtmd-cli:
build/bin/llama-mtmd-cli \
-m gguf_models/baidu/unlimited-ocr-bf16.gguf \
--mmproj gguf_models/baidu/mmproj-unlimited-ocr-bf16.gguf \
--image tools/mtmd/test-1.jpeg -p "document parsing." \
--chat-template deepseek-ocr --no-jinja \
--temp 0 --flash-attn off --no-warmup \
-n 4096 -c 16384 \
--dry-multiplier 0.8 --dry-base 1.75 --dry-allowed-length 35 \
--dry-penalty-last-n 128 --dry-sequence-breaker none
The DRY flags are a weak loop guard mirroring the reference implementation's
no_repeat_ngram_size=35 / ngram_window=128. Keep the allowed length high:
aggressive DRY settings garble the model's HTML table output.
Files
| file | |
|---|---|
| unlimited-ocr-bf16.gguf | LM bf16 |
| unlimited-ocr-q8_0.gguf | LM q8_0 |
| unlimited-ocr-Q4_K_M.gguf | LM Q4_K_M |
| mmproj-unlimited-ocr-bf16.gguf | mmproj bf16 |
| mmproj-unlimited-ocr-q8_0.gguf | mmproj q8_0 |
- Downloads last month
- 7,006
4-bit
8-bit
16-bit
Model tree for sabafallah/Unlimited-OCR-GGUF
Base model
baidu/Unlimited-OCR