ReachQA
收藏ReachQA 数据集概述
数据集获取方式
- 直接从 HuggingFace 下载:hewei2001/ReachQA。
- 克隆仓库并生成图表:使用合成代码生成图表,过程约需 3 分钟。
数据集简介
Code-as-Intermediary Translation (CIT)
- CIT 是一种成本效益高、效率高且易于扩展的数据合成方法,用于从大型语言模型(LLMs)向多模态大型语言模型(MLLMs)传递视觉推理能力。
- 通过代码作为中间媒介,将视觉图表表示转换为文本表示,使 LLMs 能够理解跨模态信息。
- 使用基于文本的合成技术构建图表绘制代码,生成 ReachQA 数据集,包含 3k 个推理密集型图表和 20k 个 Q&A 对,以增强识别和推理能力。
ReachQA 数据集
- 包含 3k 个推理密集型图表和 20k 个 Q&A 对。
- 数据集统计信息显示问题和答案的长度(基于 GPT-4o 分词器计算)。
数据集结构
ReachQA ├── assets ├── data │ ├── reachqa_seed │ ├── reachqa_test │ └── reachqa_train ├── scripts │ ├── data │ ├── eval │ ├── filter │ └── train ├── utils │ ├── chart_notes.py │ ├── openai_utils.py │ └── init.py ├── batch_filter_image.py ├── batch_filter_QA.py ├── openai_generate_code.py ├── openai_generate_QA.py ├── openai_llm_evaluation.py ├── swift_infer_dataset.py ├── requirements_data.txt └── README.md
快速开始
-
获取 ReachQA 数据集: bash cd ReachQA conda activate ReachQA_data python ./data/reachqa_train/execute_code.py --code_dir ./data/reachqa_train/code/ --image_dir ./data/reachqa_train/images/ python ./data/reachqa_test/execute_code.py --code_dir ./data/reachqa_test/code/ --image_dir ./data/reachqa_test/images/
-
使用 CIT 构建数据: bash cd ReachQA conda activate ReachQA_data bash ./scripts/data/run_openai_generate_code.sh python ./data/reachqa_train/execute_code.py --code_dir ./data/reachqa_train/all_code/ --image_dir ./data/reachqa_train/all_images/ bash ./scripts/filter/run_rating_images.sh python ./data/reachqa_train/filter_rated_image.py --data_dir ./data/reachqa_train/ bash ./scripts/data/run_openai_generate_QA.sh bash ./scripts/filter/run_rating_QA.sh python ./data/reachqa_train/filter_rated_QA.py --data_dir ./data/reachqa_train/
-
训练 / 推理 / 评估: bash cd ReachQA conda activate ReachQA_train cd ./data/reachqa_train/ python process_to_swift_internvl.py cd ../.. bash ./scripts/train/internvl2_lora.sh bash ./scripts/eval/infer_InternVL2-8B.sh bash ./scripts/eval/run_openai_evaluation.sh
主要结果
- 在七个基准测试上的评估结果,详细信息见 § 4.1。
- 展示了注意力可视化的示例,比较了原始模型和微调模型在 ChartQA 数据集上的表现。
联系
- 如有问题,请联系 whe23@m.fudan.edu.cn。
引用
@misc{he2024distill, title={Distill Visual Chart Reasoning Ability from LLMs to MLLMs}, author={Wei He and Zhiheng Xi and Wanxu Zhao and Xiaoran Fan and Yiwen Ding and Zifei Shan and Tao Gui and Qi Zhang and Xuanjing Huang}, year={2024}, eprint={2410.18798}, archivePrefix={arXiv}, primaryClass={cs.CL}, url={https://arxiv.org/abs/2410.18798}, }




