LLAMA Factory 微调Qwen2.0-VL-2B视觉大模型

本文主要参考:https://developer.aliyun.com/article/1643200

LLAMA Factory安装和使用参考:https://blog.csdn.net/pangxing6491/article/details/153682310?spm=1001.2014.3001.5501

一、制作数据集

1、增加mllm_data_tiny文件夹,并且修改dataset_info.json

2、mllm_data_tiny中包含图片和一个mllm_data_tiny.json文件,文件夹的名称和json文件名保持一致;

3、mllm_data_tiny.json格式如下,messages字段包含问题和答案,images包含图片的路径;

python 复制代码
[
  {
    "messages": [
      {
        "content": "<image>图片中的诊断结果是怎样?",
        "role": "user"
      },
      {
        "content": "The image is a non-contrasted computed tomography (CT) scan of the brain, showing the cerebral structures without any medical devices present. The region of interest, located centrally and in the middle of the image, exhibits an area of altered density, which is indicative of a brain hemorrhage. This area is distinct from the surrounding brain tissue, suggesting a possible hematoma or bleeding within the brain parenchyma. The location and characteristics of this abnormality may suggest a relationship with the surrounding brain tissue, potentially causing a mass effect or contributing to increased intracranial pressure.",
        "role": "assistant"
      }
    ],
    "images": [
      "mllm_data_tiny/8031efe0-1b5c-11ef-8929-000066532cad.jpg"
    ]
  }
]

二、选择基础大模型和目标数据集进行训练;

具体参考:https://blog.csdn.net/pangxing6491/article/details/153682310?spm=1001.2014.3001.5501

相关推荐
Allen200003 小时前
Hello-Agents task2 大语言模型基础
人工智能·语言模型·自然语言处理
我怎么又饿了呀5 小时前
DataWhale-HelloAgents(第二部分:大语言模型基础)
人工智能·语言模型·自然语言处理
汗流浃背了吧,老弟!7 小时前
基于OpenAI与DashScope的AI知识面试模拟系统实现
人工智能·语言模型
坠星不坠16 小时前
pycharm如何导入ai大语言模型的api-key
人工智能·语言模型·自然语言处理
亚里随笔1 天前
突破智能体训练瓶颈:DreamGym如何通过经验合成实现可扩展的强化学习?
人工智能·语言模型·自然语言处理·llm·agentic
wa的一声哭了1 天前
hf中transformers库中generate的greedy_search
android·java·javascript·pytorch·深度学习·语言模型·transformer
电科_银尘2 天前
【大语言模型】-- OpenAI定义的五个AGI发展阶段
人工智能·语言模型·agi
不叫猫先生2 天前
基于华为昇腾CANN的自定义算子开发
华为·语言模型·大模型·cann
AI 研究所2 天前
1024开发者节:开源发布,引领生态繁荣
人工智能·语言模型·开源·大模型·交互·agent
leafff1232 天前
AI数据库研究:RAG 架构运行算力需求?
数据库·人工智能·语言模型·自然语言处理·架构