Xiaomi-OCR-0: what it is and how to run it
2026-10-30 · 4 min read
Xiaomi-OCR-0 is a free, open-source model from Xiaomi that turns document images into structured text: Markdown for the page, tables, LaTeX for formulas, and JSON when you ask for specific fields. It has about 0.8 billion parameters, is licensed under Apache 2.0, and is small enough to run on a laptop.
@XiaomiTech_ introduced it on Friday with "Meet Xiaomi-OCR-0, an open-source document understanding model with just 0.8B parameters." The post bundles the weights, inference code, a browser demo, an MCP service and an Agent Skill, and it has passed 90,000 views. The weights and technical report first went up on Hugging Face on September 30, so Friday's post was really the public launch, with the tooling around it.
What it can do
The model folds three jobs into one: full-page parsing, key information extraction, and answering questions about what's on a page. Here is what the model card and GitHub repo list:
| Xiaomi-OCR-0 | |
|---|---|
| Size | 0.8B parameters (built on Qwen3.5-0.8B-Base) |
| License | Apache 2.0, free for commercial use |
| Output | Markdown pages, tables, LaTeX formulas, JSON fields |
| Input | Page images; PDFs work through the demo or MCP service |
| Local size | About 1.8 GB as an experimental Ollama package |
| Cost | Free to download; you run it on your own hardware |
Xiaomi reports 95.24 on Real5-OmniDocBench and an 83.2 average across five document question-answering benchmarks, and says it ranks first among sub-1B models on OmniDocBench v1.6. Those are Xiaomi's numbers. @pillitterip pointed out that the public Real5 leaderboard lists it second, at 92.73. That's still a strong result for a model this size, but it isn't the top spot.
How to try it
With nothing to install, the Hugging Face demo Space linked in Xiaomi's post lets you upload a page and see the output.
To run it yourself, the repo gives a few routes:
- On a Mac or an ordinary PC, run
ollama pull longwayxu/xiaomi-ocr-0:bf16and point the repo's demo server at Ollama. Xiaomi calls this route experimental: it was checked on seven samples on Apple Silicon, which says nothing about whether the benchmark accuracy carries over. - With an NVIDIA GPU, run
vllm serve SeerRay-Lab/Xiaomi-OCR-0 --max-model-len 16384(SGLang works too), then start the browser demo withpython demo/server.py --port 8787. - From Python, the model card has a Transformers script that picks CUDA, Apple's MPS or plain CPU on its own.
The most useful prompt for a business is the extraction one. The repo's receipt example asks: "Please output the key information in JSON format according to the following schema:" followed by fields like date, seller_name, total_amount and total_tax. Swap in your own fields (invoice number, PO, due date) and you get structured data back without writing a parser.
For full pages, use the repo's long parsing prompt, which asks for Markdown in reading order with headers and footers dropped. Xiaomi recommends whole-page mode for handwriting, scene text and odd layouts, and a two-stage region mode only for clean printed documents.
One caution on the Agent Skill. The install line tells your coding agent to "Read and execute" a SKILL.md from GitHub, and the README warns that this can create a Python environment, download weights, install a runtime and register an MCP server. Read that file yourself first.
The cloud alternative got bigger the same week
If you'd rather not run anything locally, @ClaudeDevs announced on Thursday that the Claude API's max request size for Messages and Token Counting went from 32 MB to 128 MB, because image-heavy requests and big PDFs were hitting the old cap. That makes the trade-off easier to see: a frontier model in the cloud can take a large, messy file in one request, while a 0.8B model on your own machine can grind through routine paperwork without the documents ever leaving the building.
My read
This is the second small open OCR release in a week, after Baidu's Unlimited OCR 2, which is built for hundred-page files at 3B parameters. Xiaomi went the other way: a quarter of the size, working page by page, with structured extraction built in. It's one more case of small local models getting good at narrow jobs. I'd test it on twenty of your own receipts or intake forms before trusting any leaderboard, since a missed digit in a total costs more than a messy heading.
What this means for a small business
Receipts, vendor invoices and scanned forms still get retyped by hand in a lot of offices. A free model that returns those fields as JSON can sit in front of an automated invoicing flow, with a person checking the output instead of keying it in.
If you're not sure which paperwork is worth automating first, New Face Design's free process audit maps where the hours go and tells you honestly whether a local model or a cloud API fits better.