HyperAIHyperAI

Command Palette

Search for a command to run...

HunyuanOCR-1.5: Leichtgewichtige OCR-VLMs schneller und besser machen

Zusammenfassung

Wir präsentieren HunyuanOCR-1.5, ein leichtgewichtiges und end-to-end OCR-spezialisiertes Vision-Language-Modell. HunyuanOCR zielt auf ein breites Spektrum textzentrierter visueller Aufgaben ab und vereint Dokumentenparsing, Texterkennung, Informationsextraktion, Text-Bild-Übersetzung und Multi-Image-Dokumentenverständnis in einem einzigen End-to-End-VLM. Aufbauend auf der bewährten leichtgewichtigen Architektur von HunyuanOCR-1.0 gestaltet HunyuanOCR-1.5 das Modell-Backbone nicht neu, sondern führt ein systematisches Upgrade mit zwei Zielen durch: das Modell schneller und besser zu machen. Für die Effizienz adaptieren wir die DFlash-Inferenzbeschleunigung für die OCR-Dekodierung, wodurch die Dekodierungslatenz langer strukturierter Ausgaben wie dichter Dokumente, Tabellen und Formeln erheblich reduziert wird, während die Ausgabeverteilung erhalten bleibt. Angetrieben durch DFlash erreicht HunyuanOCR-1.5 eine 6,37-fache Beschleunigung bei der Transformer-Inferenz und eine 2,14-fache Beschleunigung unter vLLM und liefert damit die schnellste Inferenzgeschwindigkeit unter allen leichtgewichtigen OCR-VLMs. Für die Fähigkeiten schlagen wir Agentic Data Flow vor, ein agentengesteuertes Datenkonstruktionssystem, das Modellschwächen in ausführbare Datenanforderungen umwandelt und autonom Materialsammlung, Qualitätsprüfung und Datenpipeline-Entwicklung durchführt. Durch dieses Framework verbessern wir die Long-Tail-Fähigkeiten des Modells in den Bereichen OCR für alte Schriften, feinkörniges Chartund Tabellenparsing, textzentrierte QA über mehrere Bilder, mehrsprachiges Parsing mit geringen Ressourcen und Dokumenten-Halluzinationsevaluierung erheblich. Entscheidend ist, dass HunyuanOCR-1.5 die erstklassige End-to-End-OCR-Lösung auf OmniDocBench v1.6 darstellt, gepaart mit unübertroffener Inferenzeffizienz und neuen Leistungsmeilensteinen in den genannten Long-Tail-Domänen. In Kombination mit einem verbesserten Pretrainingund Posttraining-Rezept erweitert HunyuanOCR-1.5 die Fähigkeitsgrenzen des Modells in hochauflösenden, langkontextigen und multitaskingfähigen Szenarien weiter. Wir charakterisieren diese Upgrades durch eine fähigkeitsorientierte Evaluierung, und Experimente zeigen, dass HunyuanOCR-1.5 sowohl eine schnellere Inferenz als auch eine breitere Abdeckung der OCR-Fähigkeiten erreicht, während die Deployment-Vorteile eines leichtgewichtigen End-to-End-Modells erhalten bleiben. Wir werden die Modellgewichte und den Trainingscode der Community zur Verfügung stellen, um die Forschung, Reproduktion und reale Anwendung von OCR-spezialisierten Vision-Language-Modellen zu fördern.

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×6.37\times6.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 BBB, the draft model proposes y^1:B\hat{\mathbf{y}}_{1:B}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, nnn 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=1Zj=1nk=1B1wk(j)[logpθ(yk(j)h<aj,m1:B(j))],Z=j=1nk=1B1wk(j)\mathcal{L}_{\mathrm{DFlash}} = \frac{1}{Z} \sum_{j=1}^{n} \sum_{k=1}^{B-1} w_{k}^{(j)} \left[ - \log p_{\theta} \left(y_{k}^{(j)} \mid \mathbf{h}_{<a_{j}}, \mathbf{m}_{1:B}^{(j)}\right) \right], \quad Z = \sum_{j=1}^{n} \sum_{k=1}^{B-1} w_{k}^{(j)}LDFlash=Z1j=1nk=1B1wk(j)[logpθ(yk(j)h<aj,m1:B(j))],Z=j=1nk=1B1wk(j) where the weight wk(j)w_{k}^{(j)}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+λ21Mj=1MRelem(ej)R_{\text{parse}} = \lambda_{1} R_{\text{text}} + \lambda_{2} \frac{1}{M} \sum_{j=1}^{M} R_{\mathrm{elem}} (e_{j})Rparse=λ1Rtext+λ2M1j=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[1Zi=1Gt=1oiai,tsi,t(Li,tPG(θ)γDKL,i,t)]\mathcal{J}_{\mathrm{IcePop}}^{\mathrm{tok}}(\theta) = \mathbb{E}_{q, \{o_{i}\}_{i=1}^{G}} \left[ \frac{1}{Z} \sum_{i=1}^{G} \sum_{t=1}^{|o_{i}|} a_{i,t} s_{i,t} \left(\mathcal{L}_{i,t}^{\mathrm{PG}}(\theta) - \gamma \mathbb{D}_{\mathrm{KL},i,t}\right) \right]JIcePoptok(θ)=Eq,{oi}i=1G[Z1i=1Gt=1oiai,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.


KI mit KI entwickeln

Von der Idee bis zum Launch – beschleunigen Sie Ihre KI-Entwicklung mit kostenlosem KI-Co-Coding, sofort einsatzbereiter Umgebung und bestem GPU-Preis.

KI-gestütztes kollaboratives Programmieren
Sofort einsatzbereite GPUs
Die besten Preise

HyperAI Newsletters

Abonnieren Sie unsere neuesten Updates
Wir werden die neuesten Updates der Woche in Ihren Posteingang liefern um neun Uhr jeden Montagmorgen
Unterstützt von MailChimp