Xiaomi Research has released Xiaomi-OCR-0, a 0.8-billion-parameter vision-language model for document parsing and OCR-based understanding. The Apache-2.0 release includes model weights, GGUF quantizations, a technical report, and an experimental community Ollama build of about 1.8 GB.
Its compact footprint supports local processing of PDFs, receipts, scans, charts, and photographed documents. Xiaomi reports document-parsing results close to models with substantially more parameters, along with strong formula recognition, table extraction, and visual question answering.
Four jobs, one prompt interface
Built from Qwen3.5-0.8B-Base and trained on roughly 170 million OCR-focused samples, Xiaomi-OCR-0 selects document tasks through the user prompt. Its supported workflows include:
- Full-page parsing: Converts a page into Markdown while preserving reading order. Tables use OTSL, a token format that represents cells and structure, while formulas use LaTeX.
- Region recognition: Extracts text, tables, or formulas from a selected part of an image.
- Key information extraction: Accepts a JSON schema and returns matching fields as structured data.
- Visual question answering: Answers OCR-dependent questions about documents, charts, and text in natural images.
Serving stays familiar
The Qwen3.5 backbone allows the model to use established inference stacks. The model card documents Hugging Face Transformers support, while vLLM and SGLang can expose it through OpenAI-compatible endpoints. The community Ollama package provides a BF16 option for local inference. A recent Transformers release that recognizes the Qwen3.5 architecture is required. A single-page parsing call looks like this:
import torch
from transformers import AutoModelForImageTextToText, AutoProcessor
model_id = "xiaomi-research/Xiaomi-OCR-0"
image_url = "https://example.com/page.png"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(
model_id,
torch_dtype="auto",
device_map="auto",
).eval()
messages = [{
"role": "user",
"content": [
{"type": "image", "url": image_url},
{
"type": "text",
"text": (
"Parse this page in reading order. Return Markdown, "
"using OTSL for tables and LaTeX for formulas."
),
},
],
}]
inputs = processor.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
with torch.inference_mode():
output_ids = model.generate(**inputs, max_new_tokens=4096)
prompt_length = inputs["input_ids"].shape[1]
result = processor.decode(
output_ids[0, prompt_length:],
skip_special_tokens=True,
)
print(result)