Command Palette
Search for a command to run...
HunyuanOCR-1.5 : Rendre les modèles OCR légers de type VLM plus rapides et plus performants
HunyuanOCR-1.5 : Rendre les modèles OCR légers de type VLM plus rapides et plus performants
Résumé
Nous présentons HunyuanOCR-1.5, un modèle vision-langage léger et de bout en bout spécialisé en OCR. HunyuanOCR cible un large éventail de tâches visuelles centrées sur le texte, unifiant l'analyse de documents, la détection de texte, l'extraction d'information, la traduction texte-image et la compréhension de documents multi-images au sein d'un seul VLM de bout en bout. S'appuyant sur l'architecture légère validée de HunyuanOCR-1.0, HunyuanOCR-1.5 ne reconçoit pas l'ossature du modèle, mais effectue une mise à niveau systématique autour de deux objectifs : rendre le modèle plus rapide et plus performant. Pour l'efficacité, nous adaptons l'accélération d'inférence DFlash au décodage OCR, réduisant significativement la latence de décodage des sorties structurées longues telles que les documents denses, les tableaux et les formules, tout en préservant la distribution de sortie. Grâce à DFlash, HunyuanOCR-1.5 atteint une accélération de 6,37× pour l'inférence Transformer et de 2,14× sous vLLM, offrant la vitesse d'inférence la plus rapide parmi tous les VLM OCR légers. Pour les capacités, nous proposons Agentic Data Flow, un système de construction de données piloté par agent qui transforme les faiblesses du modèle en exigences de données exécutables et effectue de manière autonome la recherche de matériel, la vérification de la qualité et le développement de pipelines de données. Grâce à ce cadre, nous améliorons significativement les capacités du modèle dans les domaines à longue traîne, notamment l'OCR des écritures anciennes, l'analyse fine de graphiques et de tableaux, la réponse à des questions textuelles multi-images, l'analyse multilingue à faibles ressources et l'évaluation des hallucinations documentaires. De manière cruciale, HunyuanOCR-1.5 se positionne comme la solution OCR de bout en bout de premier plan sur OmniDocBench v1.6, associée à une efficacité d'inférence inégalée et à de nouveaux jalons de performance dans les domaines à longue traîne susmentionnés. Combiné à une recette de pré-entraînement et de post-entraînement améliorée, HunyuanOCR-1.5 repousse encore les limites des capacités du modèle dans les scénarios à haute résolution, à contexte long et multi-tâches. Nous caractérisons ces améliorations par une évaluation orientée capacités, et les expériences montrent que HunyuanOCR-1.5 atteint à la fois une inférence plus rapide et une couverture plus large des capacités OCR tout en conservant les avantages de déploiement d'un modèle léger de bout en bout. Nous publierons les poids du modèle et le code d'entraînement à la communauté pour promouvoir la recherche, la reproduction et l'application concrète des modèles vision-langage spécialisés en OCR.
One-sentence Summary
HunyuanOCR-1.5, a lightweight end-to-end OCR VLM from Chinese Academy of Sciences, Tencent, and Nankai University, combines DFlash decoding acceleration for up to 6.37× Transformer speedup with an agent-driven data construction system to boost long-tail OCR capabilities, achieving state-of-the-art results on OmniDocBench v1.6 while maintaining fast inference.
Key Contributions
- HunyuanOCR-1.5 adapts DFlash speculative decoding to OCR-centric long-output generation, achieving a 6.37× Transformer inference speedup and a 2.14× speedup under vLLM, resulting in the fastest inference speed among lightweight end-to-end OCR VLMs while preserving the output distribution.
- The paper introduces Agentic Data Flow, an agent-driven data construction framework that automatically converts model weaknesses into executable data requirements and autonomously conducts material search, quality verification, and pipeline development, significantly strengthening long-tail capabilities in ancient-script OCR, fine-grained chart and table parsing, multi-image text-centric QA, low-resource multilingual parsing, and document hallucination evaluation.
- Through an upgraded pretraining and posttraining recipe, the model extends its capability boundary to support 4K-resolution perception, 128K-context understanding, and multi-image, multi-task scenarios, and establishes top-tier end-to-end document parsing performance on OmniDocBench v1.6 alongside strong long-tail gains.
Introduction
The authors address the growing need for vision-language models that can handle diverse OCR tasks beyond simple transcription, such as document parsing, information extraction, visual question answering, and multi-image understanding. Prior work often relied on cascaded pipelines that suffer from error propagation, or on OCR-specialized VLMs that are narrowly focused on document parsing, limiting their real-world applicability. Building on the lightweight HunyuanOCR-1.0 framework, the authors introduce HunyuanOCR-1.5, which integrates DFlash-based speculative decoding for faster long-output generation and an agent-driven data construction system (Agentic Data Flow) to extend capabilities to low-resource OCR, ancient scripts, and multi-image reasoning, achieving state-of-the-art end-to-end OCR performance with significant inference speedups.
Dataset
The authors construct new training data through an Agentic Data Flow system that converts model weaknesses into executable data requirements. The system uses tool-equipped agents to search, clean, and generate data, then iteratively refines pipelines with human feedback. The resulting dataset targets three capability gaps:
- Low-resource OCR data: Synthetic text images covering 331 languages. Agents collect multilingual corpora and TTF fonts from the web, test each font’s rendering compatibility, and build a pipeline that renders text on diverse backgrounds with controllable layouts and visual styles. The data provide pretraining supervision for multilingual perception.
- Ancient-script OCR data: Synthetic images for seven historical Chinese character forms. Agents gather multiple TTF fonts per script and collect text-free background images. Backgrounds are cleaned by running HunyuanOCR-1.0 and Qwen3.5 to filter out images with interfering text or unstable quality. The synthesis pipeline supports various writing directions, layouts, fonts, and degradation augmentations. The data supplement rare character forms during pretraining.
- Multi-image QA data: Question-answer pairs derived from multi-page PDFs. Agents extract page-level text and structural information, organize it into cross-page contexts, and use a strong text model to generate questions requiring cross-page retrieval, comparison, evidence aggregation, or document-level reasoning. Filtering removes questions answerable from a single page, answers inconsistent with the extracted context, and questions lacking explicit textual evidence. This data extends the model to multi-page document understanding.
Additional data include hard cases mined from HunyuanOCR-1.0 failures (missed recognition, structural disorder, table parsing errors, incorrect reading order) and long-tail layout samples.
In the training recipe, these new capability data are mixed with historical OCR data from HunyuanOCR-1.0 in the third pretraining stage (Stage3). The mixture preserves existing OCR strengths while expanding into low-resource languages, ancient scripts, multi-image understanding, and hard scenarios. To support the new data, the input specification is enlarged to a maximum image resolution of 4K and a context window of 128K tokens.
Method
The authors design HunyuanOCR-1.5 following a compact, fully end-to-end architecture. It comprises a native-resolution visual encoder, an adaptive MLP connector, and a lightweight language model.
Refer to the framework diagram:
The pivotal upgrade lies in the visual encoder, built upon Hunyuan-ViT, which extends the maximum input image resolution from 2K to 4K. This scaling preserves native aspect ratios and spatial layouts while capturing finer structural details, which is crucial for processing highly dense documents, over-sized tables, and complex charts. The adaptive MLP connector compresses high-resolution visual features into compact tokens while preserving layout sensitivity. The language component, a lightweight Hunyuan-0.5B model with XD-RoPE, processes these tokens to autoregressively generate structured OCR outputs, such as Markdown documents, HTML tables, and LaTeX formulas, without relying on task-specific post-processing modules.
To address the efficiency bottleneck of autoregressive decoding in document parsing scenarios, the authors adopt DFlash. This method uses a lightweight block-diffusion draft model to predict a block of candidate tokens in one parallel forward pass. Given a block size B, the draft model proposes y^1:B at once, and the target model verifies the block in parallel and accepts the longest valid prefix. During training, the target model is frozen, and only the DFlash draft model is optimized. For each training sequence, the target model is run once to cache its hidden states as conditional representations. Then, n anchor positions are randomly sampled, each corresponding to an independent block-drafting task. These blocks are concatenated and trained in a single forward pass with a FlexAttention block-diagonal mask.
As shown in the figure below:
Each block can attend to the target hidden states before its anchor and to the mask tokens within the same block, while different blocks remain isolated. The authors optimize a position-weighted next-token cross-entropy loss: LDFlash=Z1∑j=1n∑k=1B−1wk(j)[−logpθ(yk(j)∣h<aj,m1:B(j))],Z=∑j=1n∑k=1B−1wk(j) where the weight wk(j) excludes the anchor token and invalid positions, with exponential decay reducing the loss weight for farther positions that are harder to predict.
To extend capability boundaries, the authors introduce an Agentic Data Flow system driven by model weaknesses.
As shown in the figure below:
Algorithm engineers provide target capability requirements in natural language. The agent autonomously decomposes the task, determines required materials, tool calls, and quality criteria. The agent undertakes three key operations. First, material search and organization involves autonomously invoking web search and tools to collect materials like multilingual text corpora, TTF font files, and rendering backgrounds. Second, tool-assisted material cleaning and quality verification involves invoking tools to clean resources, filtering out candidate images with interfering text, and testing rendering compatibility of TTF files. Third, weakness-oriented data pipeline development and iteration involves autonomously developing data production pipelines, creating projects, writing scripts, and interacting with engineers to refine the pipeline based on feedback. This system is instantiated in tasks like low-resource OCR, ancient-script OCR, and multi-image QA data construction.
The training pipeline is structured into three main phases: pretraining, supervised fine-tuning (SFT), and reinforcement learning (RL). In the pretraining stage, the authors inject newly constructed capability-expansion data and enlarge the input specification to 4K resolution and a 128K context window. The SFT stage prepares a clean, well-organized training set by refining data quality, splitting data between SFT and RL, and unifying prompt design across tasks. The RL stage pushes capability ceilings using verifiable rewards.
As shown in the figure below:
The authors build a reward system tailored to OCR capabilities, consisting of three complementary components. The first is a factuality-oriented reward for document parsing that targets factual fidelity. It parses output and reference into plain-text and special elements like tables and charts. The parsing reward is computed as: Rparse=λ1Rtext+λ2M1∑j=1MRelem(ej) For tables, a 1D-probe structural reward and anchor-guided destylization mechanism are used. For charts, SCRM is applied to compute mean Average Precision, making the reward invariant to order permutations. The second component is a consistency-based judging reward for general QA, which uses an LLM-as-a-judge to verify consistency between the model response and a high-quality reference, providing flexible scoring for arbitrary QA tasks. The third component is a degeneration suppression reward for stable generation, which suppresses degenerate outputs by assigning zero reward to rollouts exceeding a predefined token limit or containing repeated fragments.
The authors adopt IcePop, a GRPO-style policy optimization variant, to mitigate the training-inference mismatch. The optimization objective is: JIcePoptok(θ)=Eq,{oi}i=1G[Z1∑i=1G∑t=1∣oi∣ai,tsi,t(Li,tPG(θ)−γDKL,i,t)] where a token-level calibration ratio is computed to retain only tokens whose ratio lies in a prescribed interval, suppressing unstable updates from train-inference discrepancies.
Experiment
HunyuanOCR-1.5 is evaluated through a capability-oriented OCR tree that verifies core parsing, QA, spotting, and extraction tasks, and newly examines long-tail languages, ancient scripts, multi-image understanding, and output faithfulness via hallucination benchmarks. The consistency-based judging reward flexibly handles general QA and translation scoring, while DFlash speculative decoding delivers up to 2.14× inference speedup, with larger gains on longer outputs. Boundary capability experiments show state-of-the-art results on ancient-script recognition, low-resource multilingual parsing, complex table and chart parsing, and preliminary multi-image QA, and seen-text faithfulness is improved though absolute recall remains low. On existing benchmarks, the model further advances end-to-end document parsing and text spotting, maintains translation and information extraction performance, and demonstrates that capability expansion does not compromise core OCR strengths.
HunyuanOCR-1.5 advances end-to-end document parsing and text spotting, and introduces robust handling of text-free images to avoid hallucinated outputs. It maintains prior performance on information extraction, video subtitle extraction, and general OCR-aware QA, while improving multilingual and multi-scenario text image translation without degrading printed-document translation. Text spotting accuracy on an internal negative set of text-free images rises sharply, from 78.1% to 99.8%, demonstrating effective suppression of false detections. Multilingual and multi-scenario text image translation is enhanced, while English-to-Chinese printed document translation remains close to the previous version's level. Performance on information extraction, video subtitle extraction, and OCRBench is preserved, showing no loss in established practical OCR capabilities. Full-page document parsing improves on structured elements such as text, tables, and reading order, though multi-line formula evaluation may underestimate actual gains due to protocol mismatches.
DFlash decoding substantially accelerates HunyuanOCR-1.5 on OmniDocBench under single-request inference, achieving a 2.14× speedup with vLLM and a 6.37× speedup with Transformers. The acceleration reduces per-sample latency from 3.032 s to 1.408 s (vLLM) and from 34.850 s to 5.474 s (Transformers), while more than doubling token throughput in vLLM. The larger gain under Transformers reflects that its autoregressive baseline is closer to naive token-by-token decoding, benefiting more from speculative decoding. DFlash reduces vLLM latency by 54% (3.032 s to 1.408 s) and improves throughput from 466.9 to 1002.3 token/s. Under Transformers, DFlash delivers a 6.37× speedup, cutting latency from 34.850 s to 5.474 s.
On OmniDocBench, HunyuanOCR-1.5 with DFlash decoding achieves the lowest per-page latency (1.408 s) and highest throughput (0.706 pages/s), a 2.14× speedup over its autoregressive baseline. Two-stage cascade pipelines (GLM-OCR, PaddleOCR-VL-1.6) are faster than end-to-end autoregressive models but slower than the DFlash-accelerated HunyuanOCR-1.5, while other end-to-end autoregressive systems fall below the baseline speed. HunyuanOCR-1.5 with DFlash reduces average latency to 1.408 seconds per page, yielding a 2.14× speedup over the same model in autoregressive mode and making it the fastest system in the comparison. Two-stage methods (GLM-OCR, PaddleOCR-VL-1.6) achieve speedups of 1.83× and 1.71× over the HunyuanOCR-1.5 autoregressive baseline, but they are still slower than the DFlash-accelerated variant.
DFlash speculative decoding delivers substantial speedups for HunyuanOCR-1.5, with gains that grow as output length increases. Under the Transformers framework, speedup rises from 4.56× for short outputs to 6.67× for very long outputs, while the effective acceptance length remains stable between 8.3 and 9.3 tokens per step. On vLLM, the acceleration is more modest for the short-output range tested, at 1.31×. On Transformers, DFlash cuts latency from 7.3 s to 1.6 s for outputs of up to 256 tokens, a 4.56× speedup. For outputs exceeding 2048 tokens, DFlash achieves a 6.67× speedup, reducing latency from 93.8 s to 14.1 s. Throughput on Transformers improves from 28.1 token/s to 126.1 token/s for short outputs and from 42.9 token/s to 239.2 token/s for very long outputs. The effective acceptance length stays within a narrow range of 8.3–9.3 tokens per speculative step across all output length buckets. Under vLLM, DFlash yields a 1.31× speedup for short outputs, lowering latency from 0.95 s to 0.72 s.
DFlash decoding consistently reduces latency and increases throughput across all content types. The largest speedups occur on table pages, reaching 7.81× under Transformers and 2.39× under vLLM, while the effective acceptance length peaks at 10.40 tokens for tables, indicating that structured outputs benefit most from speculative decoding. DFlash delivers the greatest acceleration on table pages, with speedup factors of 7.81× (Transformers) and 2.39× (vLLM), while text pages see more modest gains. The effective acceptance length is highest for table content (up to 10.40 tokens), showing that table-dense pages enable more efficient speculative decoding steps.
HunyuanOCR-1.5 is evaluated on document parsing, text spotting, translation, and information extraction tasks, demonstrating robust suppression of false detections on text-free images and improved full-page structured parsing while preserving prior capabilities. DFlash speculative decoding is assessed on OmniDocBench, delivering substantial latency reductions and throughput gains that grow with output length and peak for structured content such as tables. The accelerated model becomes the fastest system compared to autoregressive baselines and two-stage cascade pipelines, all without compromising accuracy.