xiaomi-research/Xiaomi-OCR-0
Xiaomi-OCR-0
What it solves
Traditional document processing often needs large models or a pipeline of separate tools to turn pages into structured text, extract key fields, or answer questions about image content. Xiaomi-OCR-0 packs these capabilities into a 0.8B-parameter model that runs locally and performs document parsing, key information extraction (KIE), and OCR-centric visual question answering (VQA) in one unified system.
How it works
Xiaomi-OCR-0 is a vision-language model built on Qwen3.5-0.8B and trained on about 170 million OCR-centric samples. It uses Q-Mask text anchoring during training, followed by continued pretraining (CPT) and mixed-task reinforcement learning (Mix-RL). The model can parse a whole page at once, or work in region mode: an optional layout detector (PaddleX PP-DocLayoutV3) finds regions, the model processes each crop in parallel, and outputs are assembled. Document pages become structured Markdown, with tables converted to HTML and formulas rendered in LaTeX. It also extracts requested fields as JSON and answers text-related questions about images. The repository provides a browser demo and an MCP service for agent integration, with inference runtimes like SGLang, vLLM, or Ollama.
Who it’s for
Developers and researchers who need OCR, document parsing, KIE, or OCR-centric VQA in a small, efficient model — especially those building local or agent-based document workflows. The code includes reproducible evaluation pipelines, an agent skill (SKILL.md), and a browser demo, so it suits both hands-on integration and benchmark-oriented work.
Highlights
- Compact 0.8B size with top-tier results: #1 on Real5-OmniDocBench (95.24), #2 on OmniDocBench v1.6 (96.83) and Wild-OmniDocBench (87.94).
- Strong formula and table recognition: 97.84 on UniMER-Test (formula) and 92.27 TEDS on PubTabNet (tables).
- On par with much larger models in OCR-centric VQA: mean 83.2 across five benchmarks, beating Qwen3.5-2B (80.9) with fewer parameters.
- Supports historical handwriting and calligraphy (Clerical, Cursive, Running, Regular scripts) scoring 73, comparable to Seed 2.0 Pro.
- Includes MCP service, agent Skill, local browser demo, and documented inference runtimes (SGLang, vLLM, Ollama) as well as optional region-mode layout dependencies.
- Community GGUF and NInfer conversions are available for different quantization and runtime needs.
Related
- Project
- Project
- Project
- Project