PaddleOCR-VL-1.6 ONNX
ONNX builds of PaddleOCR-VL-1.6, made by Moonbox for on-device use with ONNX Runtime (CPU, CUDA, DirectML). Each
precision is one folder holding the graphs and a small Python pipeline.py that does the rest (image preprocessing,
prompt, positions, decoding loop); what the graphs take and return is under How to run.
Files
The last column is the benchmark against the original model (details under How to run): character error rate of the recognised text against the page's text, per language, and against the original's own output.
| Precision | File | Size | sha256 | Benchmark |
|---|---|---|---|---|
| fp16 | fp16/added_tokens.json |
25.4 kB | f59f889088e0 |
CER 0.0 % / 0.0 % (original 0.0 / 0.0, fp32), identical text to the original; 0.69 s per page (CUDA) |
| fp16 | fp16/chat_template.jinja |
1.5 kB | 2f27812dab7f |
CER 0.0 % / 0.0 % (original 0.0 / 0.0, fp32), identical text to the original; 0.69 s per page (CUDA) |
| fp16 | fp16/decoder.onnx |
722.1 MB | 77f8b13d81ac |
CER 0.0 % / 0.0 % (original 0.0 / 0.0, fp32), identical text to the original; 0.69 s per page (CUDA) |
| fp16 | fp16/embed.onnx |
211.8 MB | e58798a431fe |
CER 0.0 % / 0.0 % (original 0.0 / 0.0, fp32), identical text to the original; 0.69 s per page (CUDA) |
| fp16 | fp16/generation_config.json |
0.1 kB | a6701d78ab3b |
CER 0.0 % / 0.0 % (original 0.0 / 0.0, fp32), identical text to the original; 0.69 s per page (CUDA) |
| fp16 | fp16/pipeline.py |
6.5 kB | 31a6807068dc |
CER 0.0 % / 0.0 % (original 0.0 / 0.0, fp32), identical text to the original; 0.69 s per page (CUDA) |
| fp16 | fp16/preprocessor_config.json |
0.6 kB | 111872ab1e8b |
CER 0.0 % / 0.0 % (original 0.0 / 0.0, fp32), identical text to the original; 0.69 s per page (CUDA) |
| fp16 | fp16/special_tokens_map.json |
1.2 kB | d3a125c03103 |
CER 0.0 % / 0.0 % (original 0.0 / 0.0, fp32), identical text to the original; 0.69 s per page (CUDA) |
| fp16 | fp16/tokenizer.json |
11.2 MB | c8a215a59183 |
CER 0.0 % / 0.0 % (original 0.0 / 0.0, fp32), identical text to the original; 0.69 s per page (CUDA) |
| fp16 | fp16/tokenizer_config.json |
0.2 MB | 1f979337347c |
CER 0.0 % / 0.0 % (original 0.0 / 0.0, fp32), identical text to the original; 0.69 s per page (CUDA) |
| fp16 | fp16/vision.onnx |
878.5 MB | bd38dc792fc2 |
CER 0.0 % / 0.0 % (original 0.0 / 0.0, fp32), identical text to the original; 0.69 s per page (CUDA) |
| int8 | int8/added_tokens.json |
25.4 kB | f59f889088e0 |
CER 0.0 % / 0.0 %, identical text; 1.07 s per page (CUDA) |
| int8 | int8/chat_template.jinja |
1.5 kB | 2f27812dab7f |
CER 0.0 % / 0.0 %, identical text; 1.07 s per page (CUDA) |
| int8 | int8/decoder.onnx |
363.0 MB | 840a0a14fa61 |
CER 0.0 % / 0.0 %, identical text; 1.07 s per page (CUDA) |
| int8 | int8/embed.onnx |
106.3 MB | 25f880d5e08d |
CER 0.0 % / 0.0 %, identical text; 1.07 s per page (CUDA) |
| int8 | int8/generation_config.json |
0.1 kB | a6701d78ab3b |
CER 0.0 % / 0.0 %, identical text; 1.07 s per page (CUDA) |
| int8 | int8/pipeline.py |
6.5 kB | 31a6807068dc |
CER 0.0 % / 0.0 %, identical text; 1.07 s per page (CUDA) |
| int8 | int8/preprocessor_config.json |
0.6 kB | 111872ab1e8b |
CER 0.0 % / 0.0 %, identical text; 1.07 s per page (CUDA) |
| int8 | int8/special_tokens_map.json |
1.2 kB | d3a125c03103 |
CER 0.0 % / 0.0 %, identical text; 1.07 s per page (CUDA) |
| int8 | int8/tokenizer.json |
11.2 MB | c8a215a59183 |
CER 0.0 % / 0.0 %, identical text; 1.07 s per page (CUDA) |
| int8 | int8/tokenizer_config.json |
0.2 MB | 1f979337347c |
CER 0.0 % / 0.0 %, identical text; 1.07 s per page (CUDA) |
| int8 | int8/vision.onnx |
444.7 MB | ff6cfb89f10b |
CER 0.0 % / 0.0 %, identical text; 1.07 s per page (CUDA) |
| int4 | int4/added_tokens.json |
25.4 kB | f59f889088e0 |
decoder 4-bit: CER 0.0 % / 0.0 %, identical text; 0.68 s per page (CUDA) |
| int4 | int4/chat_template.jinja |
1.5 kB | 2f27812dab7f |
decoder 4-bit: CER 0.0 % / 0.0 %, identical text; 0.68 s per page (CUDA) |
| int4 | int4/decoder.onnx |
231.9 MB | c63571ab3a6e |
decoder 4-bit: CER 0.0 % / 0.0 %, identical text; 0.68 s per page (CUDA) |
| int4 | int4/embed.onnx |
106.3 MB | 25f880d5e08d |
decoder 4-bit: CER 0.0 % / 0.0 %, identical text; 0.68 s per page (CUDA) |
| int4 | int4/generation_config.json |
0.1 kB | a6701d78ab3b |
decoder 4-bit: CER 0.0 % / 0.0 %, identical text; 0.68 s per page (CUDA) |
| int4 | int4/pipeline.py |
6.5 kB | 31a6807068dc |
decoder 4-bit: CER 0.0 % / 0.0 %, identical text; 0.68 s per page (CUDA) |
| int4 | int4/preprocessor_config.json |
0.6 kB | 111872ab1e8b |
decoder 4-bit: CER 0.0 % / 0.0 %, identical text; 0.68 s per page (CUDA) |
| int4 | int4/special_tokens_map.json |
1.2 kB | d3a125c03103 |
decoder 4-bit: CER 0.0 % / 0.0 %, identical text; 0.68 s per page (CUDA) |
| int4 | int4/tokenizer.json |
11.2 MB | c8a215a59183 |
decoder 4-bit: CER 0.0 % / 0.0 %, identical text; 0.68 s per page (CUDA) |
| int4 | int4/tokenizer_config.json |
0.2 MB | 1f979337347c |
decoder 4-bit: CER 0.0 % / 0.0 %, identical text; 0.68 s per page (CUDA) |
| int4 | int4/vision.onnx |
444.7 MB | ff6cfb89f10b |
decoder 4-bit: CER 0.0 % / 0.0 %, identical text; 0.68 s per page (CUDA) |
How to run
PaddleOCR-VL-1.6 (PaddlePaddle: a 0.9B document-parsing VLM. It pairs a NaViT-style SigLIP vision encoder with
dynamic resolution and the ERNIE-4.5-0.3B language model, and handles text, tables, formulas and charts in 100+
languages) as three ONNX graphs plus pipeline.py, a numpy runtime that reproduces the repository's processor and
greedy generate around them.
vision.onnx: one image:pixel_values[P, 3, 14, 14] (14 x 14 patches in raster order) andhw[h, w] (a dummy tensor whose shape is the patch grid) ->image_embeds[P / 4, 1024] (the vision encoder with its 2-D RoPE and interpolated position embeddings, then the 2 x 2-merging projector).embed.onnx:input_ids[1, S] ->inputs_embeds[1, S, 1024].decoder.onnx: ERNIE-4.5-0.3B, 18 layers with 3-D M-RoPE:inputs_embeds[1, S, 1024],position_ids[3, 1, S],past_key_values.{0..17}.key / .value[1, 2, P, 128] ->logitsof the last position [1, 103424] andpresent.*[1, 2, P + S, 128] (the whole cache).
pipeline.py does the rest in numpy:
- the processor: resize (bicubic) to multiples of 28 within 112 896 - 1 003 520 pixels, normalise to [-1, 1], cut into 14 x 14 patches;
- the chat prompt "User:
{task}\nAssistant:\n", one image placeholder per merged patch;
- Qwen2-VL-style 3-D positions for the image tokens;
- greedy decoding until
</s>.
It needs numpy, onnxruntime (or onnxruntime-gpu), tokenizers and Pillow:
import sys
from PIL import Image
sys.path.insert(0, "int8")
import pipeline
ocr = pipeline.PaddleOCRVL("int8", "cuda")
print(ocr(Image.open("page.png"), "OCR:")) # also "Table Recognition:", "Formula Recognition:", "Chart Recognition:"
One image per call; PaddleOCR's layout stage (PP-DocLayout), which cuts a page into blocks for the full document
pipeline, is not included. On Windows, give CUDA sessions the run option memory.enable_memory_arena_shrinkage =
gpu:0, as pipeline.py does. Every input length differs, so ONNX Runtime's GPU arena otherwise keeps growing.
Precisions. fp16/: every graph fp16 weights and math with fp32 inputs / outputs. int8/: weight-only int8
(per output channel; the embedding table per row). int4/: the decoder's MatMuls 4-bit MatMulNBits (block 32), the
rest as int8/. No bf16: fp16 passes.
Benchmark. 12 synthetic pages: six English and six Chinese sentences of our own, rendered with Windows fonts (Arial / Times New Roman, Microsoft YaHei / SimSun), so the text on each page is known exactly. The task is "OCR:", decoded greedily. The original is transformers with the repository's own code, in float32 on CUDA. Scores: character error rate (whitespace ignored) against the page's text, and against the original's own output. Pass (the ASR rule used across these repositories): per language, CER at most 1 point above the original's. The set is easy: the original reads every page exactly, and so does every build; it shows the conversion is faithful, not how the model does on hard documents. Time per page on an RTX 3080 Laptop GPU (16 GB), whole pipeline.
| CER English / Chinese | CER vs the original's text | seconds per page | |
|---|---|---|---|
| original (PyTorch fp32, CUDA) | 0.0 % / 0.0 % | - | 3.49 |
| ONNX graphs in float32 (not published) | 0.0 % / 0.0 % | 0.0 % / 0.0 % | 0.71 |
fp16/ (CUDA) |
0.0 % / 0.0 % | 0.0 % / 0.0 % | 0.69 |
int8/ (CUDA) |
0.0 % / 0.0 % | 0.0 % / 0.0 % | 1.07 |
int4/ (CUDA) |
0.0 % / 0.0 % | 0.0 % / 0.0 % | 0.68 |
Graphs checked against the original modules before the benchmark (largest absolute difference, float32): the vision wrapper is identical to the model's own visual branch, and the graph is 0.02 of 17.8 from it (1e-3 relative); embedding 0; decoder 8e-6 against the model's forward (no cache) and 4e-4 of 11 with a 40-position cache. The numpy front end gives the processor's pixel values, prompt ids and 3-D positions exactly, and the prefill logits are 5e-5 from the original's.
How these were made
From PaddleOCR-VL-1.6 at revision 132c45f52c. The graphs were exported from the original PyTorch modules with
torch.onnx (opset 17) and checked against them. Weight-only quantization: int8 is a per-output-channel int8 weight
behind DequantizeLinear, int4 is ONNX Runtime's MatMulNBits (block 32). Each card above says which precision every
graph uses. Every precision was benchmarked against the original before upload (pass: per language, character error
rate at most 1 point above the original's), and the sha256 column above is what the files must hash to.
License
apache-2.0. These files are a derivative of the original model and carry its license: it is copied in this repository, and it governs your use of these files. The original model card follows unchanged.
Original model card
PaddleOCR-VL-1.6: Expanding the Frontier of Document Parsing with Under-Optimized Region Refinement and Progressive Post-Training
Introduction
We introduce PaddleOCR-VL-1.6, an upgraded compact document parsing model built upon PaddleOCR-VL-1.5. PaddleOCR-VL-1.6 introduces a region-aware data optimization framework that identifies weak regions from the previous model, applies targeted enhancement to those regions, and improves the reliability of supervision signals. It further adopts a progressive post-training recipe based on curated data selection and reinforcement learning, pushing model performance to a higher level through staged optimization. PaddleOCR-VL-1.6 achieves a new state-of-the-art score of 96.33% on OmniDocBench v1.6, sets new records on OmniDocBench v1.5 and Real5-OmniDocBench as well, and demonstrates strong competitiveness against top-tier VLMs. The model architecture is fully compatible with PaddleOCR-VL-1.5, enabling zero-cost plug-and-play migration.
Key Capabilities of PaddleOCR-VL-1.6
🚀 New SOTA Accuracy: OmniDocBench v1.6 achieves 96.33%, setting new state-of-the-art records on OmniDocBench v1.5 and Real5-OmniDocBench as well. It delivers comprehensive leading performance across text, formula, and table recognition, surpassing both open-source and closed-source solutions.
⚡ Fully Upgraded Capabilities: Significant improvements in table, Chinese ancient document, and Chinese rare character recognition, along with notable enhancements in seal/stamp recognition, text spotting, chart recognition, and more diverse scenarios.
🔄 Seamless Migration: The model architecture is fully compatible with PaddleOCR-VL-1.5 — zero adaptation cost, plug-and-play replacement.
PaddleOCR-VL-1.6 Architecture
PaddleOCR-VL-1.6 Data Engine
News
2026.06.03🚀 We release PaddleOCR-VL-1.6 Technical Report.2026.05.28🚀 We release PaddleOCR-VL-1.6. PaddleOCR-VL-1.6 achieves a new state-of-the-art score of 96.33% on OmniDocBench v1.6, sets new records on OmniDocBench v1.5 and Real5-OmniDocBench as well, and demonstrates strong competitiveness against top-tier VLMs. The model architecture is fully compatible with PaddleOCR-VL-1.5, enabling zero-cost plug-and-play migration.
Install Dependencies
Install PaddlePaddle and PaddleOCR:
# The following command installs the PaddlePaddle version for CUDA 12.6. For other CUDA versions and the CPU version, please refer to https://www.paddlepaddle.org.cn/en/install/quick?docurl=/documentation/docs/en/develop/install/pip/linux-pip_en.html
python -m pip install paddlepaddle-gpu==3.2.1 -i https://www.paddlepaddle.org.cn/packages/stable/cu126/
python -m pip install -U "paddleocr[doc-parser]>=3.6.0"
Please ensure that you install PaddlePaddle framework version 3.2.1 or above, along with the special version of safetensors. For macOS users, please use Docker to set up the environment.
Basic Usage
CLI usage:
paddleocr doc_parser -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/paddleocr_vl_demo.png --pipeline_version v1.6
Python API usage:
from paddleocr import PaddleOCRVL
pipeline = PaddleOCRVL(pipeline_version="v1.6")
output = pipeline.predict("https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/paddleocr_vl_demo.png")
for res in output:
res.print()
res.save_to_json(save_path="output")
res.save_to_markdown(save_path="output")
Accelerate VLM Inference via Optimized Inference Servers
Start the VLM inference server:
You can start the vLLM inference service using one of two methods:
Method 1: PaddleOCR method
docker run \ --rm \ --gpus all \ --network host \ ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleocr-genai-vllm-server:latest-nvidia-gpu \ paddleocr genai_server --model_name PaddleOCR-VL-1.6-0.9B --host 0.0.0.0 --port 8080 --backend vllmMethod 2: vLLM method
Call the PaddleOCR CLI or Python API:
paddleocr doc_parser \ -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/paddleocr_vl_demo.png \ --pipeline_version v1.6 \ --vl_rec_backend vllm-server \ --vl_rec_server_url http://127.0.0.1:8080/v1from paddleocr import PaddleOCRVL pipeline = PaddleOCRVL(pipeline_version="v1.6", vl_rec_backend="vllm-server", vl_rec_server_url="http://127.0.0.1:8080/v1") output = pipeline.predict("https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/paddleocr_vl_demo.png") for res in output: res.print() res.save_to_json(save_path="output") res.save_to_markdown(save_path="output")
For more usage details and parameter explanations, see the documentation.
PaddleOCR-VL-1.6-0.9B Usage with transformers
Currently, the PaddleOCR-VL-1.6-0.9B model facilitates seamless inference via the transformers library, supporting comprehensive text spotting and the recognition of complex elements including formulas, tables, charts, and seals. Below is a simple script we provide to support inference using the PaddleOCR-VL-1.5-0.9B model with transformers.
Note: We currently recommend using the official method for inference, as it is faster and supports page-level document parsing. The example code below only supports element-level recognition and text spotting.
# ensure the transformers v5 is installed
python -m pip install "transformers>=5.0.0"
from PIL import Image
import torch
from transformers import AutoProcessor, AutoModelForImageTextToText
# ---- Settings ----
model_path = "PaddlePaddle/PaddleOCR-VL-1.6"
image_path = "test.png"
task = "ocr" # Options: 'ocr' | 'table' | 'chart' | 'formula' | 'spotting' | 'seal'
# ------------------
# ---- Image Preprocessing For Spotting ----
image = Image.open(image_path).convert("RGB")
orig_w, orig_h = image.size
spotting_upscale_threshold = 1500
if task == "spotting" and orig_w < spotting_upscale_threshold and orig_h < spotting_upscale_threshold:
process_w, process_h = orig_w * 2, orig_h * 2
try:
resample_filter = Image.Resampling.LANCZOS
except AttributeError:
resample_filter = Image.LANCZOS
image = image.resize((process_w, process_h), resample_filter)
# Set max_pixels: use 1605632 for spotting, otherwise use default ~1M pixels
max_pixels = 2048 * 28 * 28 if task == "spotting" else 1280 * 28 * 28
# ---------------------------
# -------- Inference --------
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
PROMPTS = {
"ocr": "OCR:",
"table": "Table Recognition:",
"formula": "Formula Recognition:",
"chart": "Chart Recognition:",
"spotting": "Spotting:",
"seal": "Seal Recognition:",
}
model = AutoModelForImageTextToText.from_pretrained(model_path, torch_dtype=torch.bfloat16).to(DEVICE).eval()
processor = AutoProcessor.from_pretrained(model_path)
messages = [
{
"role": "user",
"content": [
{"type": "image", "image": image},
{"type": "text", "text": PROMPTS[task]},
]
}
]
inputs = processor.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
images_kwargs={"size": {"shortest_edge": processor.image_processor.min_pixels, "longest_edge": max_pixels}},
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
result = processor.decode(outputs[0][inputs["input_ids"].shape[-1]:-1])
print(result)
# ---------------------------
👉 Click to expand: Use flash-attn to boost performance and reduce memory usage
# ensure the flash-attn2 is installed
pip install flash-attn --no-build-isolation
model = AutoModelForImageTextToText.from_pretrained(model_path, torch_dtype=torch.bfloat16, attn_implementation="flash_attention_2").to(DEVICE).eval()
Performance
Document Parsing
1. OmniDocBench v1.6
PaddleOCR-VL-1.6 achieves SOTA performance for overall, text, formula, tables on OmniDocBench v1.6
Notes:
- Performance metrics are cited from the OmniDocBench official leaderboard, except for Gemini-3 Pro, Qwen3-VL-235B-A22B-Instruct and our model, which were evaluated independently.
2. Real5-OmniDocBench
Across all five diverse and challenging scenarios—scanning, warping, screen-photography, illumination, and skew—PaddleOCR-VL-1.6 consistently sets new SOTA records
Notes:
- Real5-OmniDocBench is a brand-new benchmark oriented toward real-world scenarios, which we constructed based on the OmniDocBench v1.5 dataset. The dataset comprises five distinct scenarios: Scanning, Warping, Screen-photography, Illumination, and Skew. For further details, please refer to Real5-OmniDocBench.
Acknowledgments
We would like to thank PaddleFormers, Keye, MinerU, OmniDocBench for providing valuable code, model weights and benchmarks. We also appreciate everyone's contribution to this open-source project!
Citation
If you find PaddleOCR-VL-1.6 helpful, feel free to give us a star and citation.
@misc{zhang2026paddleocrvl16expandingfrontierdocument,
title={PaddleOCR-VL-1.6: Expanding the Frontier of Document Parsing with Under-Optimized Region Refinement and Progressive Post-Training},
author={Zelun Zhang and Hongen Liu and Suyin Liang and Yubo Zhang and Yiqing Xiang and Jiaxuan Liu and Ting Sun and Manhui Lin and Yue Zhang and Changda Zhou and Tingquan Gao and Cheng Cui and Yi Liu and Dianhai Yu and Yanjun Ma},
year={2026},
eprint={2606.03264},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2606.03264},
}
Model tree for moonbox-dev/PaddleOCR-VL-1.6-ONNX
Base model
PaddlePaddle/PaddleOCR-VL-1.6