Xiaomi-OCR-0: Tiny 0.8B model reads documents, open under Apache 2.0
Xiaomi has released Xiaomi-OCR-0, an open-source document model with just 0.8 billion parameters. It turns pages into Markdown or LaTeX, pulls fields from invoices and answers questions about documents. Xiaomi says it beats much larger models in some tests. Independent checks are still missing.

What it's about
Xiaomi has released Xiaomi-OCR-0, an open model for recognizing and analyzing documents. OCR stands for Optical Character Recognition, the conversion of images or scans into machine-readable text. Weights and code are available on Hugging Face and GitHub under the permissive Apache 2.0 license, which also allows commercial use. According to the Russian outlet Kod.ru, the weights were uploaded as early as September 30, together with a technical report. The official announcement came later. The outlet says enthusiasts have already prepared versions for local use.
The model is small: 0.8 billion parameters (roughly, the adjustable settings a model learns during training). It is based on Alibaba's Qwen3.5-0.8B-Base and was trained on about 170 million examples for text and document recognition.
What the model can do
A single model covers three tasks:
- Document parsing: Text, tables and formulas are recognized in reading order and output as Markdown or LaTeX (a notation for mathematical formulas).
- Field extraction: From invoices, receipts, ID cards and forms, it pulls the details you ask for and returns them as JSON, a structured data format.
- Question answering: It can answer questions about documents and charts, including calculations, instead of just copying text.
Training and robustness
To recognize complex tables and formulas more accurately, Xiaomi checked the labels of its training data as follows, according to Kod.ru: the parsing result was rendered back into an image and compared with the original. The model was also fine-tuned on hard cases: multilingual text, old handwriting, screenshots with moiré effects and document photos taken in poor light.
Benchmarks (manufacturer figures)
| Test | Result |
|---|---|
| OmniDocBench v1.6 | 96.83 points, 2nd overall, 1st among models under 1B |
| Real5-OmniDocBench (scanned, creased, photographed from a screen or at an angle) | 95.24 points, 1st |
| UniMER test (formulas) | 97.84 |
| PubTabNet (tables) | 92.27 |
| Chronicles-OCR (old handwriting, calligraphy) | 73 points, versus 72 for ByteDance's closed Seed 2.0 Pro |
| Five document question-answering tests, average | 83.2 (Qwen3.5-2B: 80.9; MiniCPM-V-4.5 at 8B: 82.6) |
Kod.ru stresses that these results have not yet been independently verified.
Use at Xiaomi and integration
Xiaomi already uses the technology in the "Super Xiaoai" assistant on its own smartphones. It recognizes pickup and parcel codes on screen, amounts and merchants on receipts for expense tracking, and times and places in messages to create calendar entries. For developers, there is a browser demo, an MCP server (an interface through which AI agents access tools) and a skill set for building the model into your own services and agents. According to Kod.ru, Xiaomi also released the free coding agent MiMo Code over the summer.
What you need to try it
At 0.8 billion parameters, the model is very undemanding. With 4-bit quantization (a space-saving number format), roughly 2 GB of VRAM (video memory) is enough. Even with 16-bit weights, an entry-level card with 4 GB should do. You should have at least 8 GB of RAM, and a few GB of disk space for weights and images. Running it on a CPU or an Apple silicon Mac is realistic given its size, though slower. The browser demo works without any hardware of your own. The source gives no exact figures, so these are estimates.
Our take
For anyone who wants to process invoices, receipts or scientific pages locally and with privacy in mind, such a small, freely licensed model is appealing. If the numbers hold up, it would be far more efficient for document OCR than large general-purpose vision models. Caveats remain: all benchmarks come from Xiaomi itself, the comparison with Seed 2.0 Pro covers only one test (73 to 72), and the sources don't show how well it works on German documents. The other sources (dictionary pen, MIUI 14) concern other Xiaomi products and don't belong to this story.
Sources
- Google News (BR) pasqualepillitteri.it
- goodereader.com goodereader.com
- kod.ru kod.ru
- notebookcheck.net notebookcheck.net
Try it yourself: Xiaomi-OCR-0
Explained step by step, no prior knowledge needed – on your own computer or free in your browser.
What can I do with it?
Xiaomi-OCR-0 reads documents from images and scans and outputs them as Markdown or LaTeX, including tables and formulas. It can also pull fields from invoices, receipts, ID cards and forms as JSON, and answer questions about documents and charts. At 0.8 billion parameters, the model is very small and runs locally on modest hardware. According to Xiaomi, it is on par with much larger models in document benchmarks, even with photos taken in poor light or at an angle. It isn't meant as a general-purpose chatbot. Independent tests are still pending.
Who is it worth it for?
Interesting for anyone who wants to digitize receipts, invoices, PDFs or scientific pages locally, and for developers looking for a lean OCR component. Less suitable if you need a chatbot, or reliable results for specialized German documents without running your own tests.
Ideas: What you can do with it
Photograph receipts and have the merchant, date and total output as JSON. You can then copy the result into a spreadsheet for your tax return.
Feed in PDF pages as images and get Markdown with tables and LaTeX formulas. That makes it easy to move content into note-taking apps.
Scan historical handwriting or calligraphy and have it transcribed. According to Xiaomi, the model was trained specifically for this.
Upload a chart and ask about totals or differences. The model does the math instead of just copying text.
Plug the MCP server into your own AI agent to capture incoming invoices automatically.
What your computer needs
Which variant is right for me?
Many models come in several sizes or "quantizations." These are compressed versions: smaller and faster, but slightly less accurate. Rule of thumb: pick the largest variant whose memory requirement fits in your VRAM (video memory). The scripts below choose this for you automatically.
| Variant | Download | Needs approx. | Compatible graphics cards |
|---|---|---|---|
Q3_K_M |
0.5 GB | 2 GB | almost any graphics card with 4 GB or more (e.g. GTX 1650, RTX 3050) |
Q4_K_M Default |
0.5 GB | 2 GB | almost any graphics card with 4 GB or more (e.g. GTX 1650, RTX 3050) |
Q5_K_M |
0.6 GB | 2 GB | almost any graphics card with 4 GB or more (e.g. GTX 1650, RTX 3050) |
Q6_K |
0.6 GB | 2 GB | almost any graphics card with 4 GB or more (e.g. GTX 1650, RTX 3050) |
BF16 |
1.5 GB | 3 GB | almost any graphics card with 4 GB or more (e.g. GTX 1650, RTX 3050) |
There is only one 0.8B model. On a small GPU or a Mac, a 4-bit variant is enough (according to Kod.ru, community versions for local use exist). With a bit more memory, 8-bit or full precision gets you slightly better quality.
- Around 2–3 GB of VRAM is enough in 4-bit (estimate).
- Running on a CPU with 8 GB of RAM is also possible thanks to the small size, but slower.
- High-resolution page images take extra memory.
- Xiaomi's browser demo works without any hardware of your own.
How do I find out what my computer has?
- Windows: Press Ctrl + Shift + Esc → Task Manager → Performance tab → click GPU on the left. At the bottom you'll see Dedicated GPU memory (that's your VRAM). You'll find system memory under Memory.
- Mac: Apple menu at the top left → About This Mac. You'll see your chip (e.g. M2) and memory (e.g. 16 GB). On Apple chips, graphics and processor share this memory.
- Linux: Type
nvidia-smiin the terminal (shows your graphics card and its memory) andfree -hfor system memory.
Guide
Google Colab (in your browser, no installation)
Google Colab is a free service from Google. It gives you a computer with a graphics card in your browser for a few hours. All you need is a Google account. For this model: runs for free – The free Tesla T4 GPU with 15 GB is enough.
- Download the notebook. Click the button and save the file.
- Open Colab. Go to colab.research.google.com and sign in with your Google account.
- Upload the notebook. In the window that appears, click Upload on the left (or choose File → Upload notebook at the top) and select the file
colab.ipynb. - Turn on the GPU. In the top menu, go to Runtime → Change runtime type → under Hardware accelerator, select T4 GPU → Save.
- Start everything. Runtime → Run all (keyboard shortcut Ctrl + F9). If you see the warning “This notebook was not authored by Google,” click Run anyway.
- Wait. The cells run one after another. A green checkmark appears to the left of each cell when it's done. Installation and download take about 4 minutes here.
- Try it out. The result appears below the last cell. To test something else, change the text in the cell and run it again with Shift + Enter. The last cell starts a proper chat with an input field.
- Clean up. When you're done: Runtime → Disconnect and delete runtime. This saves your free quota.
Good to know: The free GPU is limited (usually a few hours per day). After about 90 minutes of inactivity, Colab disconnects, and you'll have to start everything over.
Windows 10 / 11
The easiest way is Ollama, a free program that launches AI models with a single command.
- Update your graphics driver (NVIDIA cards only): Install the NVIDIA app or the latest driver. For AMD cards, use the latest Adrenalin driver.
- Install Ollama. Download the file OllamaSetup.exe from ollama.com/download/windows, double-click it, and choose Install. Afterward, a small llama icon appears in the taskbar at the bottom right.
- Open a terminal window. Press the Windows key, type PowerShell and press Enter. A blue or black window opens.
- Start the model. Copy this command ("Copy" button), paste it into the window with a right-click, and press Enter:
The first time, Ollama downloads the model (0.5 GB (about 1 min at 100 Mbit/s)). After that, it's instant.ollama run hf.co/prithivMLmods/Xiaomi-OCR-0-GGUF:Q4_K_M - Start typing. Once
>>> Send a messageappears, type your question and press Enter. Type/byeto end the chat.
Not enough memory? Pick a smaller variant from the table above, e.g. ollama run hf.co/prithivMLmods/Xiaomi-OCR-0-GGUF:Q3_K_M.
Prefer automatic? A script that picks the right variant for you
- Download both files into the same folder: try_windows.ps1 demo.py
- Open the folder in File Explorer, right-click an empty spot and choose Open in Terminal.
- Paste this command and press Enter:
powershell -ExecutionPolicy Bypass -File try_windows.ps1
If needed, the script installs Ollama via winget, measures your VRAM (video memory) and downloads the matching variant.
macOS
Macs with an Apple chip (M1 to M5) are ideal. Older Intel Macs are very slow.
- Install Ollama. Download it from ollama.com/download/mac, open the file, and drag Ollama into your Applications folder. Launch Ollama once – a llama appears in the menu bar at the top.
- Open Terminal. Press Cmd + Space, type Terminal, and press Enter.
- Start the model. Paste the command (Cmd + V) and press Enter:
The first time, the model is downloaded (0.5 GB (about 1 min at 100 Mbit/s)).ollama run hf.co/prithivMLmods/Xiaomi-OCR-0-GGUF:Q4_K_M - Start typing. Type your question and press Enter. Quit with
/bye.
Linux
- Check your GPU.
nvidia-smishould show your card. If it doesn't, install the driver on Ubuntu and restart:sudo ubuntu-drivers install - Install Ollama:
curl -fsSL https://ollama.com/install.sh | sh - Start the model:
Exit withollama run hf.co/prithivMLmods/Xiaomi-OCR-0-GGUF:Q4_K_M/bye. Useollama psto check whether the model is running on the GPU. - Or let it pick the right variant automatically:
bash try_linux.sh # mit Python/transformers statt Ollama: MODE=hf bash try_linux.sh
Try it
Convert this document to Markdown.Output all tables on the page as Markdown tables.Extract the invoice number, date, total amount and issuer as JSON.Write the formula in the image as LaTeX.According to the chart, which month has the highest revenue, and how big is the gap to the second highest?
Tips for better results
- Give clear tasks, such as parsing, field extraction or a question, and name the JSON fields you want for extraction.
- Split multi-page PDFs into individual page images.
- Try the browser demo first before installing locally.
If something goes wrong
The exact Hugging Face repo isn't given in the source. Search Hugging Face and GitHub for Xiaomi-OCR-0.
Because the model is based on Qwen3.5, you need a recent version of Transformers or your inference tool.
Images with too low a resolution lead to errors, so use sharp scans.
German documents aren't explicitly tested in the sources. Spot-check umlauts.
Community GGUF versions aren't official, so check the source.
“out of memory,” a crash, or your computer freezes
The model is too big for your VRAM (video memory). Pick a smaller variant from the table above and close other programs, especially games and browsers with lots of tabs.
It runs, but extremely slowly
Your CPU is probably doing the work instead of your graphics card. In Ollama, the PROCESSOR column of ollama ps shows how much runs on the GPU. If it says "100% CPU", update your graphics driver or pick a smaller variant that fits entirely into VRAM (video memory).
“ollama” or “python” is not found
Close the terminal window and open it again so it recognizes the newly installed program. For Python on Windows: reinstall it and check Add python.exe to PATH.
Windows: "Running scripts is disabled on this system"
Run the script with exactly the command above: powershell -ExecutionPolicy Bypass -File try_windows.ps1. This allows execution for this one time only.
Error message when loading the model (version, "trust_remote_code", unknown architecture)
Brand-new models often need the latest software version. With Ollama: update Ollama. With Python: pip install -U transformers in the activated environment. The Model Card usually lists the exact version.
Tokenstrom generates the scripts and notebook automatically. Please take a quick look before running them – they're plain, readable text. Mind the model's license: apache-2.0.
Ask the AI assistant
Questions about this article, installation or background? Our assistant knows this page and runs on our own machine, not in someone else's cloud.
The Assistant is an AI (Gemma 4) and can make mistakes – please check important details against the source. Questions are used only to generate an answer and are deleted after one hour. Please don't enter any personal data.
Comments
What do you think? Already tried it? Write it here, no sign-up needed.
Comments are public. Links aren't allowed, and we delete abusive posts. You can delete your own comment at any time in this browser. Learn more in the Privacy Policy.