Back home

Xiaomi-OCR-0

x+huggingface 0.85
Visit source

Intro

Xiaomi-OCR-0 is an open-source, 0.8-billion-parameter OCR-specialised vision-language model from Xiaomi (released under the xiaomi-research organisation on Hugging Face). A single compact model handles three jobs that normally need separate tools: whole-page document parsing (text, tables and formulas to Markdown/LaTeX/OTSL), key information extraction (KIE) into JSON, and OCR-centric visual question answering.

Weights and a technical report (arXiv:2609.36136) were published at the end of September 2026; on October 30, 2026 Xiaomi's official account announced it on X, the post passed 2,500 likes, and the model became one of the most discussed small OCR models of the week. It is licensed Apache-2.0, so commercial use is allowed.

Explain

Key facts

  • Size: ~0.8B parameters (about 1.8 GB in BF16), fine-tuned from Qwen3.5-0.8B-Base.
  • Training data: roughly 170M OCR-centric samples built by a data engine that uses Ensemble Triplet Consensus across expert OCR models, render-guided verification and targeted synthesis.
  • Training recipe: Q-Mask text anchoring → OCR-centric continued pre-training → Mix-RL (mixed-task reinforcement learning with verifiable rewards).

Benchmarks (as reported by Xiaomi)

Benchmark Score
Real5-OmniDocBench 95.24 (#1)
OmniDocBench v1.6 96.83 (#2, best under 1B)
Wild-OmniDocBench 87.94
UniMER-Test (formulas) 97.84
PubTabNet (tables) 92.27
5 OCR-VQA benchmarks (mean) 83.2 – above Qwen3.5-2B

Community tests posted on X report it beating LFM3-VL-2B on receipts (23/23 lines vs 21/23). Note that the public Real5 leaderboard shows a slightly lower number than Xiaomi's own claim, so treat headline scores as vendor-reported.

Why it matters

Most strong document parsers are 1B+ parameters or cloud APIs. Xiaomi-OCR-0 brings near state-of-the-art parsing and field extraction to laptops, consumer GPUs (it runs on an 8 GB RTX 2070) and even edge devices, which is ideal for invoice/receipt pipelines and private on-device document AI.

Usage

How to try it

  1. Hugging Face: download xiaomi-research/Xiaomi-OCR-0 and run it with Transformers (AutoModelForImageTextToText + AutoProcessor). Xiaomi's verified combo is transformers==5.17.0, torch==2.14.0.
  2. Ollama (experimental): ollama pull longwayxu/xiaomi-ocr-0:bf16, then use the repo's MCP service or browser demo so the correct preprocessing and prompts are applied.
  3. llama.cpp / GGUF: community quantisations such as prithivMLmods/Xiaomi-OCR-0-GGUF (remember the mmproj vision projector).

Task prompts

  • Whole page: "Extract all information from the main body of the document image and represent it in markdown format…"
  • 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" + your JSON schema.

Good fits

  • Receipt / invoice / form extraction straight to JSON
  • Converting scanned PDFs and photographed pages to Markdown for RAG
  • An OCR tool for coding agents via the bundled MCP server and Agent Skill