PaddleOCR-VL 是一款专为文档解析打造、兼具 SOTA 性能与资源效率的模型。其核心组件 PaddleOCR-VL-0.9B 是一款精简而强大的视觉语言模型(VLM),通过融合 NaViT 风格动态分辨率视觉编码器与 ERNIE-4.5-0.3B 语言模型,实现精准的元素识别。这一创新模型可高效支持 109 种语言,擅长识别复杂元素(如文本、表格、公式和图表),同时保持极低的资源消耗。经过公开常用基准与内部基准的全面评估,PaddleOCR-VL 在页面级文档解析和元素级识别两方面均取得 SOTA 表现。它显著优于现有方案,在与顶级 VLM 的对比中展现出强劲竞争力,并具备快速推理速度。凭借这些优势,它非常适合在真实场景中落地部署。
精简而强大的 VLM 架构: 我们提出了一种新颖的视觉语言模型,专为资源高效推理而设计,在元素识别方面取得了优异表现。通过将 NaViT 风格动态高分辨率视觉编码器与轻量级 ERNIE-4.5-0.3B 语言模型相结合,我们显著增强了模型的识别能力与解码效率。这种融合在保持高精度的同时降低了计算开销,使其更适用于高效且实用的文档处理场景。
文档解析的 SOTA 性能: PaddleOCR-VL 在页面级文档解析和元素级识别方面均达到 SOTA 性能。它显著优于现有的基于流水线的方案,并在文档解析任务中与领先视觉语言模型(VLM)展现出强劲竞争力。此外,它擅长识别复杂文档元素,如文本、表格、公式和图表,因此能够适配手写文本和历史文档等大量具有挑战性的内容类型。这使得它具备高度通用性,适用于广泛的文档类型与应用场景。
多语言支持: PaddleOCR-VL 支持 109 种语言,覆盖全球主要语言,包括但不限于中文、英文、日文、拉丁文和韩文,同时也涵盖具有不同文字体系与结构特点的语言,例如俄语(西里尔字母)、阿拉伯语、印地语(天城文)和泰语。这一广泛的语言覆盖能力,显著提升了我们系统在多语言及全球化文档处理场景中的适用性。
2025.11.07 🚀 在 transformers 库中启用 flash-attn,使 PaddleOCR-VL-0.9B 实现更快的推理。2025.11.04 🌟 PaddleOCR-VL-0.9B 现已在 vLLM 上获得官方支持。2025.10.29 🤗 支持通过 transformers 库调用 PaddleOCR-VL 的核心模块 PaddleOCR-VL-0.9B。2025.10.16 🚀 我们发布 PaddleOCR-VL——采用 0.9B 超紧凑视觉语言模型,实现具有 SOTA 性能的多语言文档解析。安装 PaddlePaddle 和 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.4.0"CLI 用法:
paddleocr doc_parser -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/paddleocr_vl_demo.png --pipeline_version v1Python API 用法:
from paddleocr import PaddleOCRVL
pipeline = PaddleOCRVL(pipeline_version="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")启动 VLM 推理服务器:
您可以通过以下两种方法之一启动 vLLM 推理服务:
方法 1:PaddleOCR 方式
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-0.9B --host 0.0.0.0 --port 8080 --backend vllm方法 2:vLLM 方式
调用 PaddleOCR CLI 或 Python API:
paddleocr doc_parser \
-i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/paddleocr_vl_demo.png \
--pipeline_version v1 \
--vl_rec_backend vllm-server \
--vl_rec_server_url http://127.0.0.1:8080/v1from paddleocr import PaddleOCRVL
pipeline = PaddleOCRVL(pipeline_version="v1", 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")更多使用详情和参数说明,请参见文档。
目前,我们支持通过 transformers 库使用 PaddleOCR-VL-0.9B 模型进行推理,可识别文本、公式、表格以及图表元素。未来,我们计划通过 transformers 支持完整文档解析推理。下面是一个我们提供的简单脚本,用于支持通过 transformers 使用 PaddleOCR-VL-0.9B 模型进行推理。
[!NOTE] 注意:目前我们推荐使用官方方式进行推理,因为其速度更快,并支持页面级文档解析。下面示例代码仅支持元素级识别。
from PIL import Image
import torch
from transformers import AutoModelForCausalLM, AutoProcessor
# ---- Settings ----
model_path = "PaddlePaddle/PaddleOCR-VL"
image_path = "test.png"
task = "ocr" # Options: 'ocr' | 'table' | 'chart' | 'formula'
# ------------------
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
PROMPTS = {
"ocr": "OCR:",
"table": "Table Recognition:",
"formula": "Formula Recognition:",
"chart": "Chart Recognition:",
}
image = Image.open(image_path).convert("RGB")
model = AutoModelForCausalLM.from_pretrained(
model_path, trust_remote_code=True, torch_dtype=torch.bfloat16
).to(DEVICE).eval()
processor = AutoProcessor.from_pretrained(model_path, trust_remote_code=True)
messages = [
{"role": "user",
"content": [
{"type": "image", "image": image},
{"type": "text", "text": PROMPTS[task]},
]
}
]
inputs = processor.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_dict=True,
return_tensors="pt"
).to(DEVICE)
outputs = model.generate(**inputs, max_new_tokens=1024)
outputs = processor.batch_decode(outputs, skip_special_tokens=True)[0]
print(outputs)# ensure the flash-attn2 is installed
pip install flash-attn --no-build-isolationimport torch
from transformers import AutoModelForCausalLM, AutoProcessor
from PIL import Image
# ---- Settings ----
model_path = "PaddlePaddle/PaddleOCR-VL"
image_path = "test.png"
task = "ocr" # ← change to "table" | "chart" | "formula"
# ------------------
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
model = AutoModelForCausalLM.from_pretrained(
model_path,
trust_remote_code=True,
torch_dtype=torch.bfloat16,
attn_implementation="flash_attention_2",
).to(dtype=torch.bfloat16, device=DEVICE).eval()
processor = AutoProcessor.from_pretrained(model_path, trust_remote_code=True)
PROMPTS = {
"ocr": "OCR:",
"table": "Table Recognition:",
"chart": "Chart Recognition:",
"formula": "Formula Recognition:",
}
messages = [
{
"role": "user",
"content": [
{"type": "image", "image": Image.open(image_path).convert("RGB")},
{"type": "text", "text": PROMPTS[task]}
]
}
]
inputs = processor.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_dict=True,
return_tensors="pt"
).to(DEVICE)
with torch.inference_mode():
out = model.generate(
**inputs,
max_new_tokens=1024,
do_sample=False,
use_cache=True
)
outputs = processor.batch_decode(out, skip_special_tokens=True)[0]
print(outputs)
说明:
- 指标来自 MinerU、OmniDocBench 以及我们内部的评测。
OmniDocBench-OCR-block 性能对比
PaddleOCR-VL 在处理多种文档类型方面具有稳健且多样的能力,成为 OmniDocBench-OCR-block 性能评估中的领先方法。
In-house-OCR 性能对比
In-house-OCR 对多种语言和多种文本类型下的性能进行评估。我们的模型在全部受评测文字中均展现出卓越的准确性,并取得了最低的编辑距离。
In-house-Table 性能对比
我们的自建评测集包含多种类型的表格图像,例如中文表格、英文表格、中英混合表格,以及具有全边框、部分边框或无边框等特征的表格,还包括书籍/手册格式、列表、学术论文、合并单元格,以及低质量、带水印等表格。PaddleOCR-VL 在所有类别中均取得卓越表现。
In-house-Formula 性能对比
In-house-Formula 评测集包含简单印刷体、复杂印刷体、相机扫描件以及手写公式。PaddleOCR-VL 在每个类别中均表现最佳。
In-house-Chart 性能对比
该评测集大致分为 11 类图表,包括柱线混合图、饼图、100% 堆叠柱状图、面积图、柱状图、气泡图、直方图、折线图、散点图、堆叠面积图和堆叠柱状图。PaddleOCR-VL 不仅优于专家级 OCR VLM,还超越了一些 72B 级别的多模态语言模型。
我们感谢 ERNIE、Keye、MinerU、OmniDocBench 提供宝贵的代码、模型权重和基准。我们也感谢每一位参与者对这个开源项目的贡献!
如果您觉得 PaddleOCR-VL 有用,欢迎为我们点亮星标并引用。
@misc{cui2025paddleocrvlboostingmultilingualdocument,
title={PaddleOCR-VL: Boosting Multilingual Document Parsing via a 0.9B Ultra-Compact Vision-Language Model},
author={Cheng Cui and Ting Sun and Suyin Liang and Tingquan Gao and Zelun Zhang and Jiaxuan Liu and Xueqing Wang and Changda Zhou and Hongen Liu and Manhui Lin and Yue Zhang and Yubo Zhang and Handong Zheng and Jing Zhang and Jun Zhang and Yi Liu and Dianhai Yu and Yanjun Ma},
year={2025},
eprint={2510.14528},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2510.14528},
}