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

相关推荐
Carl_奕然19 小时前
【智能体】Agent的四种设计模式之:ReAct
人工智能·设计模式·语言模型
量子-Alex20 小时前
【大模型】监督微调与强化学习:大型语言模型后训练方法的研究
人工智能·语言模型·自然语言处理
ybdesire21 小时前
间接提示词注入真实样例鉴赏
网络安全·语言模型·漏洞·漏洞分析
墨心@1 天前
赋予智能体技能,让其胜任现实世界任务
语言模型·大语言模型·agent
还是奇怪1 天前
AI 提示词工程入门:用好的语言与模型高效对话
大数据·人工智能·语言模型·自然语言处理·transformer
迁旭1 天前
claude code 提示词
人工智能·语言模型·gpt-3·知识图谱
硅谷秋水2 天前
ClawVM:有状态工具LLM智体的Harness管理型虚拟内存
人工智能·深度学习·语言模型
迁旭2 天前
OpenAI API 请求与响应 核心总结
人工智能·机器学习·语言模型·gpt-3
AI周红伟2 天前
周红伟:OpenClaw安全防控:OpenClaw+Skills+DeepSeek-V4大模型安全部署、实操和企业应用实操
人工智能·深度学习·安全·机器学习·语言模型·openclaw
小超同学你好2 天前
OpenClaw 深度解析与源代码导读 · 第11篇:子 Agent(Sub-Agent)——隔离执行与“向上汇报“的有限协作
人工智能·语言模型·transformer