📦 Model layout. This repository hosts HunyuanOCR-1.5 checkpoint at the root (target base weights). The DFlash speculative-decoding draft lives under dflash/, and the previous HunyuanOCR-1.0 is archived under v1.0/ (load it with subfolder="v1.0", or download the v1.0/ directory directly).
📖 Introduction
HunyuanOCR-1.5 is a lightweight, end-to-end OCR-specialized vision-language model. It targets a broad range of text-centric visual tasks and unifies document parsing, text spotting, information extraction, text-image translation within a single end-to-end VLM.
Building upon the validated lightweight architecture of HunyuanOCR-1.0, HunyuanOCR-1.5 does not redesign the model backbone. Instead, it performs a systematic upgrade around two goals — making the model faster and better:
⚡ Faster — DFlash inference acceleration. End-to-end OCR is often accompanied by long autoregressive decoding, which becomes the major bottleneck for dense documents, tables, formulas, and other long structured outputs. HunyuanOCR-1.5 adapts a speculative-decoding framework based on DFlash: a lightweight block-diffusion draft model drafts multiple candidate tokens in parallel, which are then verified by the target model in a single pass. This significantly reduces the decoding latency of long structured outputs while preserving the output distribution of the target model.
💻 PC-side deployment via llama.cpp. Beyond server-grade vLLM, HunyuanOCR-1.5 also supports CPU / consumer-GPU / laptop deployment through llama.cpp with a GGUF-converted checkpoint and an OpenAI-compatible llama-server. A DFlash-adapted llama.cpp fork is provided as well, so the same speculative-decoding acceleration is available on PC.
🧠 Better — Agentic Data Flow + upgraded training recipe. On the data side, we propose Agentic Data Flow, an agent-driven data-construction system that translates model weaknesses into executable data requirements. Agents deeply participate in material search, tool-based verification, sample cleaning, and data-pipeline development, and iterate in a closed loop with algorithm engineers. In HunyuanOCR-1.5, this system is used for targeted long-tail capabilities such as low-resource OCR, ancient-script OCR, and multi-image text-centric QA. On the training side, we systematically upgrade the recipe: pretraining Stage-3 is re-planned to incorporate the newly produced capability data, multi-image data, and historical OCR data, with maximum image resolution extended to 4K and context window extended to 128K; post-training refines the SFT data and further explores RL across different OCR tasks to amplify the gains from reinforcement learning.
Together, HunyuanOCR-1.5 achieves both faster inference and broader OCR capability coverage while retaining the deployment advantages of a lightweight end-to-end model. The full SFT / DFlash training pipeline and the transformers / vLLM / llama.cpp inference stack are open-sourced in the GitHub repo.
⚙️ Environment
Inference now uses a single unified environment (built on uv, requires CUDA 13) that runs all three configurations from the same install: vLLM AR, DFlash speculative decoding, and native transformers. Accuracy alignment across the three has been verified.
The inference code lives on GitHub under inference/ (inference/vLLM, inference/DFlash, inference/transformers). See docs/inference/inference.md for the full setup and usage. If you lack CUDA 13 or only need one configuration, that document also points to the lighter per-configuration recipes in the archive.
Common prerequisites: Python 3.10+ (3.12 tested), an NVIDIA GPU, and huggingface_hub for downloading the weights:
bash
1pip install -U "huggingface_hub[cli]"2# target base (1.5) — skip the archived 1.0 to save space3huggingface-cli download tencent/HunyuanOCR --local-dir ./HunyuanOCR --exclude "v1.0/*"
The download contains both the base model and the dflash/ draft model.
🧪 Inference
All configurations share the same weights and the same task-type prompts + sampling (temperature=0.0, top_p=1.0, top_k=-1, repetition_penalty=1.08) + post-processing, so their outputs are directly comparable. Grab the toolkit from GitHub first:
The model ships the official HunYuanVLForConditionalGeneration + AutoProcessor
integration (transformers ≥ 5.13.0). The simplest path — weights are pulled
from the Hub automatically:
For multi-GPU batch inference with sampling / early-stop / doc-parse
normalization strictly aligned to the vLLM client, use the shipped script
after installing the unified environment (see
docs/inference/inference.md):
The unified environment (installed as shown above) serves the model as tencent/HunyuanOCR with -tp 1 and --max-model-len 131072, and supports both plain autoregressive (AR) decoding and DFlash speculative decoding from
the same install.
DFlash (speculative decoding). The DFlash draft ships under the dflash/
subfolder of tencent/HunyuanOCR, so it is already inside ./HunyuanOCR after
the huggingface-cli download above. serve_DFlash.sh defaults DFLASH_PATH
to ${MODEL_PATH}/dflash, so no manual copy is needed:
Client (either mode). Send one image with the shipped client. The
prompt is locked to an official task type via --task-type (run
--list-tasks to see all); sampling and streaming tail-repetition early-stop
/ cleanup are built in:
For CPU / consumer-GPU / laptop environments, HunyuanOCR-1.5 can also be deployed through llama.cpp after converting the checkpoint to GGUF. Both the community llama.cpp (HunyuanOCR base only) and a DFlash-adapted fork (wendadawen/llama.cpp @ dflash-adapt-hunyuanocr-hunyuanstyle) are supported.
The model also handles text spotting, information extraction, and text-image translation — pass a task-specific instruction as the text prompt (or use --task-type with the shipped client).
We would like to thank Qwen and DFlash for their valuable models and ideas.
Special thanks to the Hugging Face community for their Day-0 support.
📜 License
HunyuanOCR-1.5 is released under the same license as HunyuanOCR 1.0 — the Tencent Hunyuan Community License Agreement. See LICENSE for the full terms.
📚 Citation
bibtex
1@article{HunyuanOCR_1_5_2026,
2 title = {{HunyuanOCR-1.5}: Making Lightweight {OCR} {VLMs} Faster and Better},
3 author = {Li, Gengluo and Wan, Xingyu and Peng, Shangpin and Wang, Weinong and Feng, Hao and Du, Yongkun and Wu, Binghong and Ruan, Zheng and Lu, Zhiqiong and Wu, Liang and Lyu, Pengyuan and Shen, Huawen and Lin, Zibin and Hu, Shijing and Yang, Jieneng and Wen, Hongbing and Yu, Guanghua and Liu, Hong and Wang, Bochao and Ma, Can and Hu, Han and Zhang, Chengquan and Zhou, Yu},
4 journal = {arXiv preprint arXiv:2607.04884},
5 year = {2026}
6}