PaddleMIX MULLM_WebUI 是一个基于PaddleMIX套件的交互式平台,主要支持多模态理解任务的模型微调与推理功能。MULLM_WebUI 提供了丰富的可视化操作界面,支持用户进行模型微调、推理等操作。
Model | Model Size | Inference | SFT | LoRA |
---|---|---|---|---|
qwen2_vl | 2B/7B | ✅ | ✅ | ✅ |
PPDocBee-2B-1129 | 2B | ✅ | ✅ | ✅ |
qwen2_5_vl | 3B/7B/72B | ✅ | ❌ | ❌ |
- ✅: Supported
- 🚧: In Progress
- ❌: Not Supported
-
安装Paddle和PaddleMIX依赖
-
安装PaddleMIX MULLM WebUI依赖
pip install -r paddlemix/MULLM_WebUI/requirements.txt
CUDA_VISIBLE_DEVICES=0 \
GRADIO_SHARE=1 \
GRADIO_SERVER_NAME=0.0.0.0 \
GRADIO_ANALYTICS_ENABLED=0 \
GRADIO_SERVER_PORT=8260 python paddlemix/MULLM_WebUI/run_web.py
- 为了方便大家进行训练,我们给出了使用 DataCopilot处理图片得到的高质量文档QA数据集,该数据集包含1700张图片,包含多个关于文章内容、图表等类型的问答对话。
- 在PaddleMIX下创建目录data, 将解压后到
test_data
到./data
目录下, 并新建dataset_info.json
并填入以下内容
{
"test_data":{
"file_name": "test_data/example.json",
"formatting": "sharegpt",
"columns": {
"messages": "messages",
"images": "images"
},
"tags": {
"role_tag": "role",
"content_tag": "content",
"user_tag": "user",
"assistant_tag": "assistant"
}
}
}
-
下载 Pokemon 数据集。Pokemon-gpt4o-captions 是一个基于精灵宝可梦的中英双语视觉问答数据集,其问答结果由gpt4o生成。其中中文问答数据共计833条,数据集大小80.8M。
-
放置中文数据集文件到
./data/pokemon_gpt4o_zh/pokemon_gpt4o_zh.parquet
-
运行转换数据集脚本
python paddlemix/MULLM_WebUI/scripts/convert_dataset.py \
--data_dir ./data \
--dataset_dir pokemon_gpt4o_zh \
--file_name ./data/pokemon_gpt4o_zh/pokemon_gpt4o_zh.parquet
注:目前MULLM WebUI只支持单卡微调,为了达到更佳的训练效果,建议自己构建数据集或者按照qwen2_vl 样例中提供的脚本进行微调。
- 模型选择
@inproceedings{zheng2024llamafactory,
title={LlamaFactory: Unified Efficient Fine-Tuning of 100+ Language Models},
author={Yaowei Zheng and Richong Zhang and Junhao Zhang and Yanhan Ye and Zheyan Luo and Zhangchi Feng and Yongqiang Ma},
booktitle={Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 3: System Demonstrations)},
address={Bangkok, Thailand},
publisher={Association for Computational Linguistics},
year={2024},
url={http://arxiv.org/abs/2403.13372}
}