HSD:基于分层推测解码的文档解析视觉语言模型训练免费加速
HSD: Training-Free Acceleration for Document Parsing Vision-Language Models with Hierarchical Speculative Decoding
AI总结:
本文提出HSD分层推测解码框架,通过轻量级管道起草器预测区域划分并生成粗稿,分阶段验证以保持全文连贯性,实验证明在文档解析任务中实现显著加速。
摘要:
文档解析是多模态理解中的基本任务,支持信息提取和智能文档分析等下游应用。受益于强大的语义建模和稳健的泛化能力,基于VLM的端到端方法近年来已成为主流范式。然而,这些模型常面临显著的推理延迟,因为处理长格式文档时必须自回归生成长全文序列。尽管最近的混合方法通过区域级并行解码缓解了这一问题,但独立区域解码会失去全文上下文并可能削弱全局连贯性。为了解决这个问题,我们提出了分层推测解码(HSD),一种针对文档解析的两阶段局部到全局框架。HSD首先使用轻量级管道起草器预测区域划分并为每个区域生成粗稿。第一阶段并行验证生成的区域级草稿以提高效率,而第二阶段进一步在这些细化输出上进行页面级验证,以保持全文连贯性。实验结果表明,我们的HSD在OmniDocBench v1.5上使用HunyuanOCR实现了2.78倍接近无损的加速,在长文档解析任务中实现了高达7.04倍的加速,证明了所提方法的有效性。我们将发布代码以促进可重复性。
英文摘要:
Document parsing is a fundamental task in multimodal understanding, supporting a wide range of downstream applications such as information extraction and intelligent document analysis. Benefiting from strong semantic modeling and robust generalization, VLM-based end-to-end approaches have emerged as the mainstream paradigm in recent years. However, these models often suffer from substantial inference latency, as they must autoregressively generate long, full-page sequences when processing long-form documents. While recent hybrid methods mitigate this issue via region-level parallel decoding with VLMs, independent region decoding loses full-page context and might weaken global coherence. To address this issue, we propose Hierarchical Speculative Decoding (HSD), a two-stage local-to-global framework for document parsing. HSD first employs a lightweight pipeline drafter to predict region partitions and generate coarse drafts for each region. The first stage verifies the generated region-level drafts in parallel for efficiency, while the second stage further performs page-level verification on these refined outputs to preserve full-page coherence. Experimental results show that HSD achieves a near-lossless 2.7x speedup with HunyuanOCR on OmniDocBench v1.5 and up to 7.04x speedup on long-document parsing tasks, demonstrating the effectiveness of the proposed method. The code is available at https://github.com/whlscut/HSD.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。