0

Document parsing with HunyuanOCR and OpenVINO

HunyuanOCR is a lightweight, end-to-end OCR-specialised vision-language model released by the Tencent Hunyuan team. It pairs a SigLIP-style vision encoder with a compact Hunyuan text decoder and unifies document parsing, text spotting, information extra

Example · مثال

Content

Document parsing with HunyuanOCR and OpenVINO

HunyuanOCR is a lightweight, end-to-end OCR-specialised vision-language model released by the Tencent Hunyuan team. It pairs a SigLIP-style vision encoder with a compact Hunyuan text decoder and unifies document parsing, text spotting, information extraction, and text-image translation in a single end-to-end VLM, while remaining small enough for on-device deployment.

You can find more information in the model card and the GitHub repository.

In this tutorial we convert HunyuanOCR to the OpenVINO Intermediate Representation via optimum-intel, optionally compress its weights to INT8 (or keep FP16) with NNCF, and run inference on Intel CPU / integrated GPU / Arc GPU. The basic inference usage is aligned with the official HuggingFace transformers (native) snippet from the model card. A streaming Gradio demo — with the same task presets as the official HunyuanOCR Space — is provided as well.

Notebook contents

The tutorial consists of the following steps:

  • Install requirements
  • Convert and Optimize model (INT8 or FP16 weights)
  • Select inference device (CPU / GPU / AUTO)
  • Run HunyuanOCR on a sample image (document parsing / spotting / IE / translation prompts)
  • Launch an interactive Gradio demo

Installation instructions

This is a self-contained example that relies solely on its own code.</br> We recommend running the notebook in a virtual environment. You only need a Jupyter server to start. For details, please refer to the [Installation Guide](../../README.md).

⚠️ EXPERIMENTAL NOTEBOOK

This notebook demonstrates a model that has not been fully validated with OpenVINO and is using a custom branch of optimum-intel (hunyuan-ocr-support). It may be fully supported and validated in the future.

Source and license

Source
Intel OpenVINO Notebooks
Original
openvinotoolkit/openvino_notebooks/notebooks/hunyuan-ocr
License
Apache-2.0