arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.18443cs.CL
收藏

olmOCR:利用视觉语言模型解锁PDF中的数万亿Token

olmOCR: Unlocking Trillions of Tokens in PDFs with Vision Language Models

Allen Institute for AI(艾伦人工智能研究所)

Jake Poznanski, Aman Rangapur, Jon Borchardt, Jason Dunkelberger, Regan Huff, Daniel Lin, Aman Rangapur, Christopher Wilhelm, Kyle Lo, Luca Soldaini

AI总结:

olmOCR通过微调7B视觉语言模型并构建26万页训练数据,以低成本将PDF高效转换为保留结构化内容的线性文本,性能超越GPT-4o等顶级VLM。

摘要:

PDF文档有潜力为语言模型训练提供数万亿个新颖且高质量的Token。然而,这些文档类型多样,格式和视觉布局各异,在尝试提取并忠实表示底层内容以供语言模型使用时构成了挑战。传统的开源工具与视觉语言模型(VLM)相比,通常产生质量较低的提取结果,但依赖最好的VLM可能成本过高(例如,GPT-4o每百万PDF页面超过6,240美元),或者当PDF无法发送到专有API时不可行。我们提出了olmOCR,这是一个开源工具包,用于将PDF处理为按自然阅读顺序排列的干净、线性化的纯文本,同时保留结构化内容,如章节、表格、列表、公式等。我们的工具包运行一个经过微调的7B视觉语言模型(VLM),该模型在olmOCR-mix-0225上训练,olmOCR-mix-0225是从超过100,000个爬取的PDF中抽取的260,000页样本,具有多样化的属性,包括图形、手写文本和低质量扫描件。olmOCR针对大规模批处理进行了优化,能够灵活扩展到不同的硬件配置,并且仅需176美元即可转换一百万页PDF。为了便于与现有系统进行比较,我们还引入了olmOCR-Bench,这是一个精心整理的1,400个PDF集合,涵盖了许多即使对最好的工具和VLM而言仍具挑战性的内容类型,包括公式、表格、微小字体、旧扫描件等。我们发现olmOCR甚至优于顶级VLM,包括GPT-4o、Gemini Flash 2和Qwen-2.5-VL。我们公开发布olmOCR的所有组件:我们微调的VLM模型、训练代码和数据、支持vLLM和SGLang后端的高效推理流水线,以及基准olmOCR-Bench。

英文摘要:

PDF documents have the potential to provide trillions of novel, high-quality tokens for training language models. However, these documents come in a diversity of types with differing formats and visual layouts that pose a challenge when attempting to extract and faithfully represent the underlying content for language model use. Traditional open source tools often produce lower quality extractions compared to vision language models (VLMs), but reliance on the best VLMs can be prohibitively costly (e.g., over 6,240 USD per million PDF pages for GPT-4o) or infeasible if the PDFs cannot be sent to proprietary APIs. We present olmOCR, an open-source toolkit for processing PDFs into clean, linearized plain text in natural reading order while preserving structured content like sections, tables, lists, equations, and more. Our toolkit runs a fine-tuned 7B vision language model (VLM) trained on olmOCR-mix-0225, a sample of 260,000 pages from over 100,000 crawled PDFs with diverse properties, including graphics, handwritten text and poor quality scans. olmOCR is optimized for large-scale batch processing, able to scale flexibly to different hardware setups and can convert a million PDF pages for only 176 USD. To aid comparison with existing systems, we also introduce olmOCR-Bench, a curated set of 1,400 PDFs capturing many content types that remain challenging even for the best tools and VLMs, including formulas, tables, tiny fonts, old scans, and more. We find olmOCR outperforms even top VLMs including GPT-4o, Gemini Flash 2 and Qwen-2.5-VL. We openly release all components of olmOCR: our fine-tuned VLM model, training code and data, an efficient inference pipeline that supports vLLM and SGLang backends, and benchmark olmOCR-Bench.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑