用开源模型将图像元数据转为视觉指令数据,降低成本并提升质量。
Instructify: Demystifying Metadata to Visual Instruction Tuning Data Conversion
- 设计多阶段流程,用开源大模型自动转换图像标签为对话式指令。
- 在多个基准上比GPT-4生成的指令平均提升3%,最高达12%。
- 代码开源,适合想低成本构建高质量视觉指令数据的研究者。
视觉指令微调(VisIT)数据通常以人类与助手之间的含图对话形式存在,是当前对齐大型语言模型(LLM)以理解视觉输入、转化为强视觉语言模型(LMM)的主要方式。尽管已有众多VisIT数据集,但多数依赖各团队独立开发的非标准化方法,缺乏可复现代码和文档,并依赖GPT-4、Gemini、Claude等闭源付费API将图像元数据(标签)转化为指令,导致成本高且难以扩展。本文提出统一开放的方法——Instructify,使用开源大模型将元数据高效转换为VisIT指令。该方法包含元数据分组、质量控制、数据组织与对话采样等模块。实验表明,在相同图像数据与元数据源下,本方法可复现或超越现有数据质量,使Gemma 2 27B和LLaMa 3.1 70B等开源模型生成的指令平均提升3%,个别基准最高达12%。同时,该方法支持规模与质量双提升,显著增强最终LMM在多类基准上的表现。我们还分析了对话格式、基座模型选择与重采样策略的影响。相关代码已开源,支持复现更高质数据及面向特定领域的新数据构建。
原文摘要 · Abstract (English)
Visual Instruction Tuning (VisIT) data, commonly available as human-assistant conversations with images interleaved in the human turns, are currently the most widespread vehicle for aligning strong LLMs to understand visual inputs, converting them to strong LMMs. While many VisIT datasets are available, most are constructed using ad-hoc techniques developed independently by different groups. They are often poorly documented, lack reproducible code, and rely on paid, closed-source model APIs such as GPT-4, Gemini, or Claude to convert image metadata (labels) into VisIT instructions. This leads to high costs and makes it challenging to scale, enhance quality, or generate VisIT data for new datasets. In this work, we address these challenges and propose an open and unified recipe and approach,~\textbf{\method}, for converting available metadata to VisIT instructions using open LLMs. Our multi-stage \method features an efficient framework for metadata grouping, quality control, data and prompt organization, and conversation sampling. We show that our approach can reproduce or enhance the data quality of available VisIT datasets when applied to the same image data and metadata sources, improving GPT-4 generated VisIT instructions by ~3\% on average and up to 12\% on individual benchmarks using open models, such as Gemma 2 27B and LLaMa 3.1 70B. Additionally, our approach enables effective performance scaling - both in quantity and quality - by enhancing the resulting LMM performance across a wide range of benchmarks. We also analyze the impact of various factors, including conversation format, base model selection, and resampling strategies. Our code, which supports the reproduction of equal or higher-quality VisIT datasets and facilities future metadata-to-VisIT data conversion for niche domains, is released at https://github.com/jacob-hansen/Instructify.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。