Skip to page content
SAVRN
Search Plan a project

Open-weight model · Image and text to text

Xiaomi-OCR-0-Ninfer

by ByronLee ByronLeeee/Xiaomi-OCR-0-Ninfer

Xiaomi-OCR-0-Ninfer is an open-weight model for image and text to text from ByronLee, released under Apache License 2.0. Its published files total 1.7 GB. It draws 5 downloads a month.

This BF16 conversion of Xiaomi-OCR-0 supports OCR and document parsing. The source model is based on Qwen3.5-0.8B-Base. The artifact includes language and vision weights, the tokenizer and image-processing configuration.

Parameters—
Context—
Weights1.7 GB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads5

Model Card

By ByronLee, published under apache-2.0, revision 1fbe6e03c58e.

This BF16 conversion of Xiaomi-OCR-0 supports OCR and document parsing. The source model is based on Qwen3.5-0.8B-Base. The artifact includes language and vision weights, the tokenizer and image-processing configuration. Build the ninfer-extended main branch to run this artifact. This starts an OCR service with 32K context per request, four concurrent requests and BF16 weights/KV. Build dependencies: 64-bit Linux (WSL2 on Windows), CUDA supporting sm120a, C++20, CMake ≥3.28, Ninja, FFmpeg development libraries, libcurl, PCRE2, cuDNN 9 and cuBLAS. Omit CUBLASROOT when cuBLAS is installed with CUDA. Both engines use BF16 weights/KV, 4K context, one request, identical images/prompts, greedy…

Read ByronLee's full model card

Xiaomi-OCR-0 BF16 for NInfer

This BF16 conversion of Xiaomi-OCR-0 supports OCR and document parsing. The source model is based on Qwen3.5-0.8B-Base. The artifact includes language and vision weights, the tokenizer and image-processing configuration.

Build and run

Build the ninfer-extended main branch to run this artifact.

git clone https://github.com/ByronLeeeee/ninfer-extended.git
cd ninfer-extended
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release \
  -DCUDNN_ROOT=/path/to/cudnn -DCUBLAS_ROOT=/path/to/cublas
cmake --build build --target ninfer-serve -j
pip install huggingface_hub
hf download ByronLeeee/Xiaomi-OCR-0-Ninfer xiaomi-ocr-0-bf16.ninfer --local-dir models
./build/apps/ninfer-serve models/xiaomi-ocr-0-bf16.ninfer \
  --host 127.0.0.1 --port 8080 --model-id ocr --vision \
  --max-context 32768 --kv-capacity 131072 --max-concurrency 4 \
  --kv-dtype bf16 --prefill-chunk 1024 --no-thinking --greedy

This starts an OCR service with 32K context per request, four concurrent requests and BF16 weights/KV. Build dependencies: 64-bit Linux (WSL2 on Windows), CUDA supporting sm_120a, C++20, CMake ≥3.28, Ninja, FFmpeg development libraries, libcurl, PCRE2, cuDNN 9 and cuBLAS. Omit CUBLAS_ROOT when cuBLAS is installed with CUDA.

Build and conversion guide

Transformers vs NInfer performance

Both engines use BF16 weights/KV, 4K context, one request, identical images/prompts, greedy decoding, a 1,024-token prefill chunk and a 256-token output cap. Text pages finish naturally; the formula page measures the first 256 tokens. Prefill includes vision encoding and language prefill GPU time; decode starts after the first generated token.

Transformers uses fused causal-conv1d, FLA GDN and attention, compiled vision/language prefill/decode, and decode CUDA Graphs; computational fallback was checked. The audited compiled Transformers baseline was measured on 2026-10-06 with two warmups and three formal runs; current NInfer was rechecked on 2026-10-07 with 10–16 formal runs. Tables report medians on the same GPU and settings, from separate rounds.

GPU Input TF prefill tok/s NInfer prefill tok/s Prefill change TF decode tok/s NInfer decode tok/s Decode speedup
RTX 5070 Ti Chinese document 23,060 22,490 -2.5% 173.7 423.9 2.44×
RTX 5070 Ti English contract 22,646 21,927 -3.2% 169.4 422.1 2.49×
RTX 5070 Ti Dense formulas (256 tokens) 22,197 20,640 -7.0% 171.1 420.6 2.46×
RTX 6000D Chinese document 36,193 37,718 +4.2% 233.7 543.0 2.32×
RTX 6000D English contract 36,154 38,483 +6.4% 232.2 541.4 2.33×
RTX 6000D Dense formulas (256 tokens) 35,990 35,428 -1.6% 235.1 537.8 2.29×

Changes and speedups use Transformers as the baseline: prefill change is (NInfer / Transformers − 1) × 100%; decode speedup is NInfer / Transformers.

OCR accuracy and output agreement

Two synthetic text pages contain 478 annotated characters. Character accuracy is 1 − CER, scored after character normalization and removal of whitespace and Markdown markers. Output agreement compares both complete text pages and the 256-token formula output.

GPU Transformers accuracy NInfer accuracy Exact output agreement Character difference
RTX 5070 Ti 100% (CER 0%) 100% (CER 0%) 3/3 (100%) 0%
RTX 6000D 100% (CER 0%) 100% (CER 0%) 3/3 (100%) 0%

A separate 11-page full-output comparison found 10/11 exact matches with Transformers and a 0.1933% character difference, with differences on one handwritten formula page. The current source preserves all 11 NInfer outputs; each GPU passes 225 independent FP64 operator checks.

Artifact and license

xiaomi-ocr-0-bf16.ninfer · 1,726,110,464 bytes · BF16 · Apache-2.0

SHA256: 1db6a88a5947ba06e88210feff0c44f8eeee6d7b506b4744cbf9f94a0e61cb9d

Measurements · Artifact manifest

Identity and Version

Repository
ByronLeeee/Xiaomi-OCR-0-Ninfer
Publisher
ByronLee
Task
Image and text to text
Modality
Image and text
Library
ninfer
Parameters
Not stated by the source
Languages
zh, en
Revision
1fbe6e03c58ea6c6f307972e1d201b13e53fecd6
First published
2026-10-05
Last updated
2026-10-07

Files and Weights

6 files, 1.7 GB in total.

Configuration2 files · 10.7 KB
Documentation2 files · 16.0 KB
Other1 file · 1.7 GB
Repository1 file · 1.6 KB
Every file
FileTypeSizeSHA-256
artifact-manifest.jsonConfiguration548 B —
gpu-results.jsonConfiguration10.2 KB —
LICENSEDocumentation11.6 KB —
README.mdDocumentation4.5 KB —
xiaomi-ocr-0-bf16.ninferOther1.7 GB 1db6a88a5947
.gitattributesRepository1.6 KB —

License and Download

License
apache-2.0
Access
Open weights, no gate
Download from ByronLee

Released by ByronLee through its official repository on Hugging Face. Read the license.

Built From

  • Derived from SeerRay-Lab/Xiaomi-OCR-0

Questions About Xiaomi-OCR-0-Ninfer

Can I use Xiaomi-OCR-0-Ninfer commercially?

Yes. Xiaomi-OCR-0-Ninfer is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

Similar Models

Non-uniform GGUF quantizations of a 512-expert MoE, produced with GSQ and RCO, with a vision projector for multimodal use. This repository provides GGUF quantizations of Qwen3.8-Flash-Next at four sizes, together with the model's vision projector (mmproj) for multimodal use. In contrast to uniform quantization, which applies a single quantization type to all weight tensors, each model here assigns a separate quantization type to every tensor. The assignment is obtained by a gradient-based search that allocates precision according to per-tensor sensitivity, subject to a total size budget. The resulting files are standard GGUF and run unmodified in llama.cpp, Ollama, and LM Studio. A…

Open weights apache-2.0 gguf

Model · Image and text to text

Huihui-Qwen3.8-27B-abliterated-GGUF

Huihui.ai

This is an uncensored version of Qwen/Qwen3.8-27B created with abliteration (see remove-refusals-with-transformers to know more about it). This is a crude, proof-of-concept implementation to remove refusals from an LLM model without using TransformerLens. The newly added Huihui-Qwen3.8-27B-abliterated-Underdog-Saluki series come from ConwayResearch/Underdog-Saluki-27B-1.0 and ukisai/Swift-1.5-Qwen3.8-27B-GSQ-RCO-GGUF. Only layers 22 to 52 (0-based indexing) have been ablated, while the other layers remain unablated. It may come with a small disclaimer warning. Due to ConwayResearch/Underdog-Saluki-27B-1.0 not providing an imatrix file, we will attempt to perform ablation by mixing the GGUF…

Open weights apache-2.0 transformers

Model · Image and text to text

Qwen3.8-27B-iMatrix-NVFP4-MTP-GGUF

Michał Piszczek

I built this quant because the ready-made FP4 file answered the wrong question. It was fast, but on my short WikiText-2 control it scored 6.4949 PPL. Plain Q40 scored 6.3798. The first higher-quality hybrid went too far the other way: good perplexity, 34.19 tok/s, and no comfortable room for 256K plus vision. This is the build that survived both gates. It is a 17.1 GB, 5.01 BPW mixed-precision GGUF of Qwen/Qwen3.8-27B. It keeps large, tolerant matrices in native NVFP4 and spends more bits on selected attention, Gated DeltaNet, and late FFN tensors. The trained MTP layer remains embedded in the same GGUF. This is not a fine-tune. I built the private calibration workload from 5,472 messages…

Open weights apache-2.0

Qwen3.8-27B uncensored by HauhauCS 0/465 Refusals. This is the Aggressive variant: direct answers, no refusal behavior, and minimal preamble on hard prompts. Every text GGUF preserves Qwen3.8's native NextN head, and this release adds HauhauCS FastMTP: a specific acceleration sidecar qualified across the complete quant lineup at maximum native context. Vision is included through the separate BF16 projector. No changes to datasets or intended capabilities. This release preserves Qwen3.8-27B's text, reasoning, agentic, image, and video capabilities while applying the HauhauCS Aggressive uncensoring profile. Pick Aggressive when you specifically want the model to get to the answer without…

Open weights apache-2.0

Model · Image and text to text

Qwen3.8-27B-GGUF

GGML Org

Run it in the Llama app: https://llama.app - https://huggingface.co/Qwen/Qwen3.8-27B - https://huggingface.co/incoai/Qwen3.8-27B-DFlash2 - add info

Open weights apache-2.0

lm mmap --lazy-mode on -ngl 99 -c 32768 \ mmproj-Qwen3.8-Flash-Next-BF16.gguf --local-dir. llama-mtmd-cli -m IQ3S/Qwen3.8-Flash-Next-GSQ-RCO-abliterated-IQ3S-00001-of-00002.gguf \ --mmproj mmproj-Qwen3.8-Flash-Next-BF16.gguf -lm mmap --lazy-mode on \ -md mtp-Qwen3.8-Flash-Next-Q80.gguf --draft-max 4 -lm mmap --lazy-mode on -ngl 99 -lm mmap --lazy-mode on keeps the n-gram table memory-mapped on disk: it is 28.8 GB and one row is read per token. Shard 1 wants to be resident (VRAM or RAM); shard 2 is fine on an SSD. The vision projector is a standard clip GGUF shared with the upstream tiers, 0.91 GB. Native context is 262,144 tokens and the KV cache grows with it, so start at -c 32768 and work…

Open weights apache-2.0 gguf