Xiaomi-OCR-0 (GGUF)
GGUF quantizations of SeerRay-Lab/Xiaomi-OCR-0 — a unified 0.8B OCR model built on Qwen3.5-0.8B-Base for document parsing, OCR-centric question answering and key information extraction — optimized for local inference with llama.cpp and Ollama, with its vision projector. All quants use an importance matrix.
Quick Start
With Ollama
ollama run richardyoung/xiaomi-ocr-0
# or straight from Hugging Face
ollama run hf.co/richardyoung/Xiaomi-OCR-0-GGUF:Q8_0
With llama.cpp
huggingface-cli download richardyoung/Xiaomi-OCR-0-GGUF \
--include "*Q8_0*" "mmproj*" --local-dir ./models
./llama-mtmd-cli -m ./models/Xiaomi-OCR-0-Q8_0.gguf \
--mmproj ./models/mmproj-Xiaomi-OCR-0-F16.gguf \
--image page.png -p "Extract the text in the image."
Prompts (from the model card): document → Extract all information from the main body of the document image and represent it in markdown format, ignoring headers and footers. Tables should be expressed in OTSL format, formulas in the document should be represented using LATEX format, and the parsing should be organized according to the reading order. · text region → Extract the text in the image. · table → Parse the table in the image into OTSL. · formula → Identify the formula in the image and represent it using LATEX format. · KIE → Extract key information in the image followed by your JSON schema. The authors' own image preprocessing and decoding settings are in their repo's OLLAMA.md; results here use the GGUF as-is.
Why This Model?
- 95.24 on Real5-OmniDocBench (#1) and 96.83 on OmniDocBench v1.6 (#2), per the authors
- Robust on scanned, warped, photographed and skewed pages
- Formulas (LaTeX), tables (OTSL) and JSON key-information extraction
- Only 0.8B parameters
- Apache-2.0
Use Cases
- Whole-page document parsing to Markdown
- Receipts and forms to JSON (KIE)
- Questions about the text in an image
Available Quantizations
| File | Size | Use Case |
|---|---|---|
Xiaomi-OCR-0-Q4_K_M.gguf |
0.54 GB | Smallest |
Xiaomi-OCR-0-Q5_K_M.gguf |
0.59 GB | Higher quality |
Xiaomi-OCR-0-Q6_K.gguf |
0.65 GB | Very high quality |
Xiaomi-OCR-0-Q8_0.gguf |
0.83 GB | Recommended — best accuracy for a small OCR model |
mmproj-Xiaomi-OCR-0-F16.gguf |
0.2 GB | Vision projector (required for images) |
Xiaomi-OCR-0-imatrix.gguf |
– | Importance matrix used for the quants (calibration_datav3) |
Quant Quality
Each quant compared with the F16 model using llama-perplexity --kl-divergence on the wikitext-2 test set (40 × 512-token chunks). KL divergence measures how far the quant's next-token probabilities drift from F16; lower is better. Top-token match is how often the quant picks the same next token as F16. As a rough guide, a KLD under 0.01 is hard to tell from F16, and from about 0.05 differences start to show in longer outputs. These numbers cover the text decoder only, on English prose. For OCR accuracy, see Verified below.
| Quant | Size | KL divergence | Top-token match | Perplexity (F16: 32.94) |
|---|---|---|---|---|
| Q4_K_M | 0.54 GB | 0.0286 | 89.3% | 33.50 |
| Q5_K_M | 0.59 GB | 0.0113 | 93.2% | 33.12 |
| Q6_K | 0.65 GB | 0.0067 | 94.1% | 33.11 |
| Q8_0 | 0.83 GB | 0.0010 | 97.9% | 32.96 |
Verified
Tested through Ollama before upload (Q4_K_M and Q8_0) on a synthetic invoice with the prompt Extract the text in the image.; Q4_K_M returned: 'INVOICE 4471 / Date: 2026-09-28 / Widgets x3 ... $42.00 / TOTAL: $86.20'.
Other Models by richardyoung
- New Heretic models (reproducible, listed in the Heretic Grimoire): LFM2.5-1.2B | Granite-4.2-3B | Granite-4.2-8B | Olmo-3-7B-Think | Phi-4-mini | DeepSeek-R1-0528-Qwen3-8B | Agents-A1-4B | FrogNano-4B | Muse-Glimmer-30B | Hemmingway-1
- Abliterated/Uncensored models: Qwen2.5-7B | Qwen3-14B | DeepSeek-R1-32B | Qwen3-8B
- OCR & Vision: MiniCPM-V-4.6 GGUF | dots.mocr GGUF | Unlimited-OCR GGUF | olmOCR GGUF | LightOnOCR-3-4B GGUF | WeVisDoc-4B GGUF | Xiaomi-OCR-0 GGUF
- MLX quantizations (Apple Silicon): Kimi-K2 series | olmOCR MLX
- Healthcare/Medical: Synthea 575K patients dataset | CardioEmbed
- Research: LLM Instruction-Following Evaluation (arxiv:2510.18892)
Built & maintained by Richard Young · DeepNeuro