Run Xiaomi-OCR-0 Locally on Mac: Image and PDF Recognition
Run Xiaomi-OCR-0 offline on an Apple Silicon Mac with Ollama BF16. Includes installation commands, a complete local bundle, field extraction, document questions, and M4 Max results.
Sign into save this entry.
Xiaomi-OCR-0 is Xiaomi's open-source 0.8B document model. It turns images and scans into text or Markdown, extracts requested fields, and answers questions about text in images. This guide runs it locally on an Apple Silicon Mac with Ollama BF16, using a browser interface without an API key.
1 Prepare your Mac and download the package
The bundle is for M-series Macs running macOS 14 or later. Allow 8GB of free disk space. It has been tested on an M4 Max with 64GB of memory; other memory configurations have not been tested.
Download VKE-Xiaomi-OCR-Mac-20261107.zip from Xiaomi-OCR-0 Mac Local Workbench. Sign in to this site to access the Baidu Netdisk download. Extract the ZIP and move VKE-Xiaomi-OCR-Mac into your Downloads folder.
It includes upstream source, local adaptations, Python 3.12.16, Ollama 0.40.15, offline dependencies, and about 1.77GB of model and vision-projector weights. Once downloaded, both installation and recognition work offline.
2 Install and start
Open Terminal and run:
cd "$HOME/Downloads/VKE-Xiaomi-OCR-Mac"
bash scripts/setup.sh
The script verifies the files and creates a Python environment inside the folder. When it reports that the environment is ready, run:
./启动\ OCR\ 工作台.command
You can double-click that launcher in Finder later. It opens the local OCR workbench. Use the language button to switch to English. The first recognition request needs to load the model and may take longer.
3 Read images and PDFs
Select Document parsing, upload a screenshot, receipt, or scanned image, and start parsing. The original appears on the left and the result on the right. Switch between the preview, raw text, and JSON, then copy or download the result.

Upload a PDF through the same control to parse its pages. The preview displays tables and formulas. Rendered PDF pages and Markdown are stored in outputs/pdf/ inside the project. This extracts content; it does not produce a searchable PDF with a text layer.
The bundle uses full-page mode. Region mode requires additional layout components such as PaddleX, which are not included, so its button stays disabled.
4 Extract fields and ask questions
These tasks accept images. Export the relevant PDF page as an image first.
- Field extraction: enter fields such as
merchant,date,total, then start parsing to receive JSON. Replace them with the invoice number, payee, or other fields you need. - Image question answering: upload an image and ask a specific question such as “What is the total amount?” or “What is the order number?”
Check amounts, dates, and identifiers against the original. Small blurry text, handwriting, and complex formulas need closer review.
5 Local results and limits
On an M4 Max with 64GB, a 1100×700 Chinese test receipt returned the merchant 星河书店, its order number, and the total 99.00 yuan. Field extraction produced valid JSON, and question answering and a single-page PDF also passed. Ollama reported about 2.29GB for the loaded model, excluding the browser, Python, and other processes.
Image OCR took about 2.75 seconds and the single-page PDF about 2.01 seconds for that small test input and cache state. Long documents, dense layouts, and cold starts will take different amounts of time.
Output defaults to 4096 tokens. If a long page is cut off, increase the output budget in Settings or split the document into shorter pages. More output also takes longer.
The upstream project labels Ollama support experimental. This bundle uses a community BF16 GGUF conversion. Passing functional checks does not reproduce the official two-stage parsing benchmarks; review complex formulas carefully.
6 Stop the service and troubleshoot
Double-click 停止 OCR 工作台.command when finished. Closing the browser does not stop the service. The model unloads after five idle minutes. The web and model servers listen only on local ports 8787 and 11435.
- Page unavailable: rerun the launcher and read its terminal output or the files in
logs/. Resolve any port conflict first. - Checksum failure: extract or download the complete ZIP again before installing.
- Launch fails after moving the folder: stop the service, remove only the project's
.venv, and rerun setup in the new location.
The model and upstream code use Apache-2.0; bundled components retain their own licenses. See the official repository for other deployment options and Hugging Face for the original weights.
READER CORRESPONDENCE
Comments (0)
Sign in to comment or reply. Submissions appear after moderation.
Sign into comment or reply.
No comments yet.