CoolFace
Modelpublic

sabafallah/Unlimited-OCR-GGUF

sourceHugging Faceupdated 3mo agoView on Hugging Face
3likes618downloads
Model Card

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):

  • —PR1 - converter, decoder runs full MHA: #24969
  • —PR2 - R-SWA in the decoder (stacked on PR1): #24975

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:

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

bash
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:

bash
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.ggufLM bf16
unlimited-ocr-q8_0.ggufLM q8_0
unlimited-ocr-Q4KM.ggufLM Q4KM
mmproj-unlimited-ocr-bf16.ggufmmproj bf16
mmproj-unlimited-ocr-q8_0.ggufmmproj q8_0