Repolode
xiaomi-research

xiaomi-research/Xiaomi-OCR-0

A unified 0.8B vision-language model for document parsing, key information extraction and OCR-centric visual question answering.

Stars
956
Forks
57
Open issues
0
Last commit
9 days ago

What is it?

Xiaomi-OCR-0 is a 0.8B vision-language model built on Qwen3.5-0.8B and trained on an OCR-centric corpus. It turns document page images into structured Markdown, with tables converted to HTML and formulas written in LaTeX. It also extracts requested fields as JSON and answers questions about text in document images.

The repository ships an Agent Skill with an MCP service that handles prompts, PDF and image preparation, optional layout region detection, parallel crop inference, and output assembly. A local browser demo covers whole-page and region parsing, KIE, VQA and PDF parsing. Inference runs on SGLang or vLLM, with an experimental Ollama path using a community BF16 GGUF package.

Region mode uses PaddleX with PP-DocLayoutV3 and suits printed, regular documents. For scene text, handwriting or irregular layouts, the project recommends whole-page parsing.

Key features

  • 01Parses document pages into Markdown, with tables as HTML and formulas in LaTeX.
  • 02Extracts requested fields from documents as JSON.
  • 03Answers OCR-centric questions about document images.
  • 04Provides an MCP service and Agent Skill for local agent integration.
  • 05Offers a local browser demo for page, region, KIE, VQA and PDF parsing.
  • 06Runs on SGLang or vLLM, with experimental Ollama support.

Use cases

  • Converting scanned or digital PDFs into Markdown for downstream processing.
  • Extracting structured fields such as invoice or form data as JSON.
  • Asking questions about text, charts or tables in document images.
  • Running a local OCR service that an AI agent can call through MCP.

Quick start

  1. 1

    Clone the repository

    git clone https://github.com/SeerRay-Lab/Xiaomi-OCR-0.git
  2. 2

    Start the vLLM inference server (keep it running)

    vllm serve SeerRay-Lab/Xiaomi-OCR-0 --host 127.0.0.1 --port 8000 --max-model-len 16384
  3. 3

    In the repository directory, create a virtual environment and install requirements

    python3 -m venv .venv source .venv/bin/activate python -m pip install -r requirements.txt
  4. 4

    Start the browser demo, then open http://127.0.0.1:8787

    python demo/server.py --port 8787

Things to know

  • Needs a compatible GPU and a SGLang or vLLM runtime installed separately, which have hardware-specific requirements.
  • Region parsing needs extra PaddlePaddle and PaddleX dependencies.
  • The Ollama path is experimental and its accuracy is not validated against the benchmarks.

In collections

Topics

FAQ

What is Xiaomi-OCR-0?
A unified 0.8B vision-language model for document parsing, key information extraction and OCR-centric visual question answering. Xiaomi-OCR-0 is a 0.8B vision-language model built on Qwen3.5-0.8B and trained on an OCR-centric corpus. It turns document page images into structured Markdown, with tables converted to HTML and formulas written in LaTeX. It also extracts requested fields as JSON and answers questions about text in document images.
Is Xiaomi-OCR-0 free to use? What license does it have?
Xiaomi-OCR-0 is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is Xiaomi-OCR-0 still maintained?
Actively maintained. The last commit to Xiaomi-OCR-0 was on Oct 29, 2026.
What can I use Xiaomi-OCR-0 for?
Converting scanned or digital PDFs into Markdown for downstream processing. Extracting structured fields such as invoice or form data as JSON. Asking questions about text, charts or tables in document images. Running a local OCR service that an AI agent can call through MCP.
How do I install Xiaomi-OCR-0?
Clone the repository: git clone https://github.com/SeerRay-Lab/Xiaomi-OCR-0.git Start the vLLM inference server (keep it running): vllm serve SeerRay-Lab/Xiaomi-OCR-0 --host 127.0.0.1 --port 8000 --max-model-len 16384 In the repository directory, create a virtual environment and install requirements: python3 -m venv .venv source .venv/bin/activate python -m pip install -r requirements.txt Start the browser demo, then open http://127.0.0.1:8787: python demo/server.py --port 8787
Where can I get Xiaomi-OCR-0?
The source code and installation instructions are on GitHub: https://github.com/xiaomi-research/Xiaomi-OCR-0

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects