Image-Text-to-Text
PaddleOCR
Safetensors
English
Chinese
multilingual
paddleocr_vl
ERNIE4.5
PaddlePaddle
image-to-text
ocr
document-parse
layout
table
formula
chart
conversational
custom_code
Eval Results
Instructions to use PaddlePaddle/PaddleOCR-VL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PaddleOCR
How to use PaddlePaddle/PaddleOCR-VL with PaddleOCR:
# See https://www.paddleocr.ai/latest/version3.x/pipeline_usage/PaddleOCR-VL.html to installation from paddleocr import PaddleOCRVL pipeline = PaddleOCRVL(pipeline_version="v1") output = pipeline.predict("path/to/document_image.png") for res in output: res.print() res.save_to_json(save_path="output") res.save_to_markdown(save_path="output") - Notebooks
- Google Colab
- Kaggle
Commit History
2 days ago
-
Keep broadcast mask dims in per-image vision attention; pass BlockMask through
Verified signature- Per-image eager/SDPA vision attention sliced both mask dims, so a broadcastable `[B, 1, 1, L]` padding mask got an empty query dim for every image after the first and failed with a size mismatch (e.g. `cu_seqlens=[0, 4, 8]`). Size-1 dims are now kept and only real sequence dims are sliced. - `_create_causal_mask` read `attention_mask.ndim`, which a flex-attention `BlockMask` does not have. The dense 4D conversion now applies only to `torch.Tensor`, so a BlockMask reaches the native `create_causal_mask`, which returns it unchanged. Tested with transformers 4.57.6, 5.12.1 and 5.22.1: packed attention with `[B,1,1,L]` and `[B,1,L,L]` padding masks matches running each image alone (eager, SDPA), a BlockMask is returned as the same object, and the existing CPU fp32 / A100 bf16 (eager, SDPA, FA2) regression checks still pass. Co-Authored-By: Claude Code <noreply@anthropic.com>bb2c9bb
3 days ago
-
Always use native create_causal_mask; fix FA2 and save_pretrained on v5
Verified signature- Drop the cache gate and `_create_causal_mask_fallback`. This file already needs transformers >= 4.54, where `masking_utils.create_causal_mask` exists. The gate pushed every cached call on 5.6-5.16 onto the fallback, which lost the SDPA `is_causal` fast path and the flex BlockMask, and gave FA3/FA4 a 4D mask. The signature differences (`input_embeds` -> `inputs_embeds`, removal of `cache_position`) are now resolved once from `inspect.signature`, and `position_ids` is passed as None because 3D M-RoPE coordinates are not packed-sequence positions. - Declare `_supports_flash_attn = True` on `PaddleOCRPreTrainedModel`. v5 reads only this name, so `attn_implementation="flash_attention_2"` raised "PaddleOCRVisionModel does not support Flash Attention 2 yet". 4.x accepts both names. - Use dict-style `_tied_weights_keys = {"lm_head.weight": "model.embed_tokens.weight"}`. v5 calls `.items()` on it, so the list form made `save_pretrained` raise `AttributeError: 'list' object has no attribute 'k…1cd6565 -
Remove test artifacts from the compatibility fix
Verified signature8410628 -
Reuse native mask backends and unify protected initialization
Verified signatureff17647
5 days ago
-
Record full-checkpoint compatibility regression results
Verified signature2e71fa8 -
Fix remote-code compatibility across Transformers 4.x and 5.x
Verified signatureThis draft ports the remote-code compatibility fix to **PaddlePaddle/PaddleOCR-VL**. It preserves `AutoModelForCausalLM`, `AutoProcessor` and `trust_remote_code=True`, without requiring a pinned Transformers release. The unmodified source was reproduced on meta storage, without loading checkpoint weights: Transformers 4.57.6 reaches the text forward and raises `create_causal_mask() got an unexpected keyword argument 'inputs_embeds'`; 5.0.0 and 5.21.1 fail during construction with `KeyError: 'default'`. The architecture/configuration and affected implementation are shared with 1.6 (1.0 differs only in import order). The patch: - computes default RoPE frequencies locally; - builds causal/padding/4-D boolean masks locally, avoiding the changing Transformers mask helper interface; - obtains generation positions from prepared inputs or cache length and preserves images for uncached generation; - restores derived non-persistent RoPE/position buffers and protects loaded parameters during c…057f27f
-
Clean up Real5-OmniDocBench evaluation metadata for PaddleOCR-VL (#100)
- Clean up Real5-OmniDocBench evaluation metadata (8128091786e48864ae3a460d6910294e9033aab7)7fa00a8
-
Add Real5-OmniDocBench evaluation results for PaddleOCR-VL (#99)
- Add Real5-OmniDocBench evaluation results for PaddleOCR-VL (12cce3b642086a050b77dc20f8b2da2abd6ceb2d) Co-authored-by: chagndazhou <changdazhou@users.noreply.huggingface.co>ba0e676
-
Add new model metadata so the model card gets a pointer to the newer version of the model (#97)
- Add new model metadata so the model card gets a pointer to the newer version of the model (e91fc5aef22fa6c5833ab98b09395cf17a4c1545) Co-authored-by: Daniel van Strien <davanstrien@users.noreply.huggingface.co>f54aa90
-
Update README.md
Verified signaturebaee27e
-
Fix PaddleOCR-VL image size inference for ambiguous RGB shapes (#96)
- Fix PaddleOCR-VL image size inference for ambiguous RGB shapes (c6f1fab0351b3170df29e6e98978933482c14bb4)fdd645c
-
Update tokenizer_config.json
Verified signature5e50c66
-
Update modeling_paddleocr_vl.py (#91)
- Update modeling_paddleocr_vl.py (dd40b2ca2dd01bb8076495edd7b7468e39816257) Co-authored-by: Raushan Turganbay <RaushanTurganbay@users.noreply.huggingface.co>a1e4dc4
-
Update README.md (#87)
- Update README.md (ff7452a7bdb14269d6912d0d476924bc0c69e074) Co-authored-by: Tingquan Gao <Tingquan@users.noreply.huggingface.co>2b77538
-
update chat_template and tokenizer_config.json to be compatible with transformers (#80)
Verified signature- update (08bbcbdb905ecbc91ac04b53e9f548f38f028a3d)7faba72
-
Update README.md
Verified signaturebe8ed74 -
Update README.md
Verified signature87fd188
-
To rename for future compatibility with transformers (#71)
Verified signature- renmae (d4027c075d6b9b3acb6a7fe61fb65950069034a4)a877c8c
-
docs: Readme Updated for optimized Usage with transformers library (#60)
Verified signature- docs: Readme Updated for optimized Usage with transformers library (1787ca52c80733e53e8bc59b5b8b3aa9ee7f7018) - update (4fe79f670d8ec01d412f85db24881a50e732378e) - update (d7d1f3777c5f5dc95028e0e4bad350d88d214f7d) - update (e9b397128dde328b68890f838538606f9ab55999) - merge (f96dabf21b5f97deeb1636adfcfb0d5987de71bf) Co-authored-by: Sayed Gamal <sayed99@users.noreply.huggingface.co>466ad13
-
Update README.md
Verified signature882e3c3 -
Update README.md
Verified signaturece59d1d -
PaddleOCR-VL-0.9B is now officially supported on vLLM (#65)
Verified signature- PaddleOCR-VL-0.9B is now officially supported on vLLM (5752c20a4236b94d54aa4c807371ffeadd85aa61) - add icon (cd27a55667c83019ca4c7892705cb61392701a7f) Co-authored-by: Yue Zhang <xiaohei66@users.noreply.huggingface.co>a3dbead
-
remove unnecessary output messages from smart_resize (#61)
Verified signature- remove unnecessary output messages from smart_resize (5f51e82ea7ea0e77833deb3c99b53f46fb984844) Co-authored-by: Yue Zhang <xiaohei66@users.noreply.huggingface.co>4a039c8
-
add pad_token_id to model’s generation_config.json to fix warning (#57)
Verified signature- add pad_token_id to model’s generation_config.json to fix warning (d2990c3278598d9e9f664245be3225fadc81385b) Co-authored-by: Yue Zhang <xiaohei66@users.noreply.huggingface.co>11556b3 -
Create LICENSE (#56)
Verified signature- Create LICENSE (ca3c0f501a6651d357b2ce4920816e1987318a8e) Co-authored-by: qjyyy <qjyyy9782@users.noreply.huggingface.co>53484eb -
update chat_template for TRL (#55)
Verified signature- update chat_template for TRL (24bcbbd965a5a9793db4876d29c5df85be5facb6) Co-authored-by: Yue Zhang <xiaohei66@users.noreply.huggingface.co>489f774
-
Update README.md
Verified signature85052fe -
chat_template (#49)
Verified signature- update chat_template (59a09102ed3bd9eddcb6f0cf1152227c65651edd)b5355e1
-
Update chat_template.jinja
Verified signaturef9d60ba -
Update README.md
Verified signature7bb1266 -
Update README.md
Verified signature311e855 -
add transformers usage of PaddleOCR-VL-0.9B (#32)
Verified signature- add transformers usage of PaddleOCR-VL-0.09B (a431606b5057701c9037ae9743f3123d49e73319) - update chat_template (90dbf489af64e05f85d5bbf32bb99444d7f39f37) Co-authored-by: Ting Sun <sunflowerting78@users.noreply.huggingface.co>5b28c5f
-
Move PaddleOCR-VL-0.9B files to root directory (#31)
Verified signature- Move PaddleOCR-VL-0.9B files to root directory (87889e8941d60fb6067df575f7def3fde4a659b8) - rm useless files from .gitattributes (3a407c42f69361306d9c322914af0c549ab14da5)4760b0e
-
Update README.md
Verified signature3206d80 -
Update README.md
Verified signature5cd135b -
Update README.md
Verified signature17efbc3 -
Improve model card: Add paper, code, and project page links (#15)
Verified signature- Improve model card: Add paper, code, and project page links (688569dba2b224948551e93558c74629c90cff86) Co-authored-by: Niels Rogge <nielsr@users.noreply.huggingface.co>dd6f305
-
Update README.md
Verified signaturebe4bd59 -
Update README.md
Verified signature5888dec -
Adding `PaddleOCR` as the library name (#7)
Verified signature- Adding `PaddleOCR` as the library name (752d3324256a17ef2803254b08989cfede3e8666) Co-authored-by: Aritra Roy Gosthipaty <ariG23498@users.noreply.huggingface.co>f232f5c -
update report url
Verified signature731ed28 -
Create config.json
Verified signature9bb4887
-
update readme
Verified signature31066cc -
upload formula_zh
Verified signature3ea9081 -
update readme.md
Verified signature96cfa4e -
`use this model` is not supported yet
Verified signature543b35e -
update width
Verified signatureaa15c18 -
`use this model` is not supported yet
Verified signature431518a