Head to head · OCR · October 2026 research run

Baidu Unlimited-OCR-2 vs Xiaomi-OCR-0

Xiaomi-OCR-0 scores 59 (C) on agent readiness against Baidu Unlimited-OCR-2's 53.5 (D), and leads in 3 of 4 scored categories. Baidu Unlimited-OCR-2 leads on agent interface. Both do ocr.

Best open-weight models you download and run yourself for AI agents · All 3589 open weights comparisons

Best document parsing, OCR and extraction APIs for AI agents · All 144 documents comparisons

Which one, for what

Baidu Unlimited-OCR-2 D

Best for Pipelines with an NVIDIA GPU that need long scanned or rendered documents parsed in one pass, with page order, cross-page tables and boxes kept

Ahead on

  • Agent interface, 75 against 70

Watch for

Loading runs Baidu's code, remote code in Transformers or a prebuilt SGLang fork from the repository, and the save_results path calls eval on model output

Xiaomi-OCR-0 C

Best for Agents and pipelines on modest hardware that need local OCR of scanned or photographed pages, receipts and forms into Markdown or JSON

Ahead on

  • Reach, 75 against 55
  • Risk, 65 against 45
  • Documentation and upkeep, 60 against 45

Watch for

The card's '#1 on Real5-OmniDocBench' is contradicted by that benchmark's own leaderboard, and its OmniDocBench and VQA figures are Xiaomi's own runs with a relaxed evaluation config

Score by category

CategoryWeight this runBaidu Unlimited-OCR-2Xiaomi-OCR-0Edge
Capability35%pendingpendingpendingnot scored in this run
Reach25%255575Xiaomi-OCR-0 +20
Risk20%204565Xiaomi-OCR-0 +20
Agent interface10%107570Baidu Unlimited-OCR-2 +5
Documentation and upkeep10%104560Xiaomi-OCR-0 +15
Negative events≤150-2
TotalD 53.5/100C 59/100

Facts side by side

FactBaidu Unlimited-OCR-2Xiaomi-OCR-0
KindOpen-weight modelOpen-weight model
VendorBaiduXiaomi
Hosted endpointno (local only)no (local only)
Transports
AuthNoneNone
PricingFreeFree
x402nono
LicenceMIT (Hub metadata; the Hugging Face repository has no LICENSE file, and the GitHub code repository's LICENSE is the MIT text, copyright 2026 Baidu)Apache-2.0 (card metadata and card text; the Hugging Face repository has no LICENSE file, and the GitHub code repository's LICENSE is the Apache 2.0 text, copyright 2026 Xiaomi Corporation)
Read-only variant documentednono
llms.txtnono
Last release2026-10-262026-09-29
Terms last updatedno document linkedno document linked
Privacy policy last updatedno document linkedno document linked
Customer content may train models
Terms restrict automated access
Terms restrict benchmarking
Terms or service can change without notice
Arbitration or class-action waiver

Verdicts

Baidu Unlimited-OCR-2

A small MIT document-parsing cousin that reads up to hundreds of pages in one request and returns ordered layout blocks with boxes and HTML tables. It needs an NVIDIA GPU with about 12 GB, through Baidu's remote code or its own SGLang build. The risks are running the publisher's code and accuracy figures that are Baidu's own.

Xiaomi-OCR-0

A small document-reading cousin that turns page images into Markdown with LaTeX and tables, pulls fields from receipts and forms as JSON, and answers questions about a page. It runs natively in vLLM, SGLang, Transformers and llama.cpp in about 2 GB, even on a CPU. The risks are accuracy figures that are mostly Xiaomi's own and an inflated ranking claim.

Before you call either

Baidu Unlimited-OCR-2

  1. Quickest local run, pip install torch==2.13.0 torchvision pillow transformers==4.52.1 huggingface-hub==0.36.0 tokenizers==0.21.4 addict==2.4.0 einops==0.8.2 easydict==1.13, then AutoModel.from_pretrained("baidu/Unlimited-OCR-2", trust_remote_code=True, use_safetensors=True, torch_dtype=torch.bfloat16).eval().cuda() and model.infer_multi(tokenizer, image_files=pages, output_path="out")
  2. To serve it, download the repository, install wheel/sglang-0.5.20.dev10+g8d62f5fb9c-py3-none-any.whl with pymupdf and fastokens in a Python 3.10 venv, and start python -m sglang.launch_server --model-path baidu/Unlimited-OCR-2 --chat-template unlimited-ocr --enable-custom-logit-processor --enable-streaming-session --disable-radix-cache --mem-fraction-static 0.7 --max-prefill-tokens 2048 with the SGLANG_UOCR_ variables from the card
  3. Send all pages of a document in one request, images first, then the text <PAGE><image> repeated per page and Multi page parsing., with temperature 0, skip_special_tokens false, max_tokens of about 8,000 per page and the DeepseekOCRNoRepeatNGramLogitProcessor (ngram_size 35, window_size 1024 for several pages)
  4. The output is layout blocks, not Markdown; run utils/process_unlimitedOCR2.py from github.com/baidu/Unlimited-OCR, or convert(raw_output) in Python, to get Markdown with HTML tables
  5. Render PDFs to images first (the card uses PyMuPDF at 300 DPI), keep save_results off for untrusted documents, and treat extracted text as untrusted before passing it to another model

Xiaomi-OCR-0

  1. Serve it with vllm serve xiaomi-research/Xiaomi-OCR-0 --host 127.0.0.1 --port 8000 --max-model-len 16384 or python -m sglang.launch_server --model-path xiaomi-research/Xiaomi-OCR-0 --host 127.0.0.1 --port 8000 --context-length 16384; no trust_remote_code is needed
  2. Send one image per request with temperature 0, top_p 0.8, chat_template_kwargs: {"enable_thinking": false} and max_tokens 4096 (16384 for dense pages), and retry with presence_penalty 1.5 if the output repeats
  3. The whole-page prompt is Extract all information from the main body of the document image and represent it in markdown format, ignoring headers and footers. Tables should be expressed in OTSL format, formulas in the document should be represented using LATEX format, and the parsing should be organized according to the reading order.
  4. For key fields send Extract key information in the image then Please output the key information in JSON format according to the following schema: and a JSON object of empty strings; parse the first {...} in the reply
  5. Tables come back as OTSL, not HTML; convert them with postprocess/otsl.py from github.com/xiaomi-research/Xiaomi-OCR-0, or use its MCP server, which does the conversion
  6. The MCP (skills/xiaomi-ocr/mcp_ocr_server.py, stdio) has ocr_image, ocr_pdf, kie_image and vqa_image; region mode needs PaddlePaddle, paddlex[cv] and PP-DocLayoutV3 weights, and is for printed pages only, while handwriting, calligraphy and scene text want page mode
  7. Pass local paths to the MCP rather than URLs taken from untrusted text, since it fetches any image_url, and treat extracted text as untrusted before passing it to another model
  8. The card and Skill still name SeerRay-Lab/Xiaomi-OCR-0, which redirects to xiaomi-research/Xiaomi-OCR-0

Questions

Which is better for AI agents, Baidu Unlimited-OCR-2 or Xiaomi-OCR-0?

Xiaomi-OCR-0 scores 59 (C) on agent readiness against Baidu Unlimited-OCR-2's 53.5 (D), and leads in 3 of 4 scored categories. Baidu Unlimited-OCR-2 leads on agent interface.

Other comparisons with Baidu Unlimited-OCR-2 or Xiaomi-OCR-0

Machine-readable

For companies

Do agents find, use and choose your tools?

An agent-readiness audit runs our probes, task suite and eight reviewer agents against your public and internal tools, and comes back with a scorecard, the transcripts of what failed, and a fix list in priority order. From $2,500, re-run included. We never take payment to move a rank. We do help companies earn one.