Xiaomi-OCR-0
by xiaomi-research
Xiaomi's 0.8B OCR model that parses documents and answers questions about them, including charts, tables and formulas, under Apache 2.0.
xiaomi-research/Xiaomi-OCR-0Deploy Xiaomi-OCR-0
Single-tenantMixpeek has no managed extractor for this model. On a single-tenant deployment you upload the weights and a custom plugin serves them next to the rest of your pipeline.
Overview
Xiaomi-OCR-0 is a 0.8B-parameter vision-language model from Xiaomi, released on September 30, 2026. One model handles whole-page parsing, OCR-oriented visual question answering and key information extraction, so it can return a page as Markdown or answer a question about what the page shows. Xiaomi reports 95.24 on Real5-OmniDocBench, where it ranks first on its own comparison table, and 84.6 on the ChartQA benchmark. Weights are on Hugging Face under Apache 2.0.
Architecture
Built from Qwen3.5-0.8B-Base and trained on a corpus of about 170M OCR samples. Xiaomi describes three training steps: Q-Mask text anchoring to align fine-grained text with its location, OCR-centric continued pretraining, and mixed-task reinforcement learning with verifiable rewards on hard examples.
Mixpeek SDK Integration
# Parse one document image to Markdown (adapted from the Xiaomi-OCR-0 model card).
# pip install "transformers==5.17.0" "torch==2.14.0" "torchvision==0.29.0" pillow
import torch
from transformers import AutoModelForImageTextToText, AutoProcessor
MODEL = "xiaomi-research/Xiaomi-OCR-0"
PROMPT = (
"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."
)
processor = AutoProcessor.from_pretrained(MODEL)
model = AutoModelForImageTextToText.from_pretrained(MODEL, dtype=torch.float16).to("cuda").eval()
messages = [{"role": "user", "content": [
{"type": "image", "url": "page.png"},
{"type": "text", "text": PROMPT},
]}]
inputs = processor.apply_chat_template(
messages, tokenize=True, add_generation_prompt=True,
return_dict=True, return_tensors="pt",
).to("cuda")
with torch.inference_mode():
output = model.generate(**inputs, max_new_tokens=4096, do_sample=False)
print(processor.batch_decode(output[:, inputs["input_ids"].shape[1]:], skip_special_tokens=True)[0])Capabilities
- Whole-page parsing to Markdown, with tables in OTSL and formulas in LaTeX
- Question answering over documents, infographics and charts
- Key information extraction to a JSON schema you supply
- Scanned, warped, photographed and skewed pages
- GGUF and Ollama community builds, plus Transformers
Use Cases on Mixpeek
Benchmarks
| Dataset | Metric | Score | Source |
|---|---|---|---|
| Real5-OmniDocBench | Overall score | 95.24 | https://huggingface.co/xiaomi-research/Xiaomi-OCR-0 |
| OmniDocBench v1.6 | Overall score | 96.83 | https://huggingface.co/xiaomi-research/Xiaomi-OCR-0 |
| ChartQA | Score | 84.6 | https://huggingface.co/xiaomi-research/Xiaomi-OCR-0 |
Performance
We have not measured it. Scores are Xiaomi's own, from its model card.
Common Pipeline Companions
Frequently Asked Questions
What is Xiaomi-OCR-0?
A 0.8B-parameter OCR model from Xiaomi that parses documents and also answers questions about them. It covers Markdown parsing, tables, formulas, charts and field extraction with a single model.
Can Xiaomi-OCR-0 read charts?
Xiaomi reports 84.6 on the ChartQA benchmark, ahead of the 0.8B, 2B and 4B Qwen3.5 models in its table and behind MiniCPM-V-4.5 at 87.4. Treat values it reads from a chart as needing a check against the source page.
Can I use Xiaomi-OCR-0 commercially?
The model card lists Apache 2.0.
What output formats does it return?
Markdown for whole pages, OTSL for tables, LaTeX for formulas, plain text for text regions, and a JSON object for key information extraction when you pass a schema.
How do I use it with Mixpeek?
Run it where your documents are, store each page's Markdown and fields with the file and page number, and upsert them into a collection so the text is searchable and the fields filterable.
Specification
Build a pipeline with Xiaomi-OCR-0
Add this model to a processing pipeline alongside other extractors. Combine with retrieval stages for end-to-end search.
Run it on your own data, free