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

相关推荐
长不大的杨瑞杰11 小时前
给 OpenCode v2 接入大模型:Provider、模型选择与 API Key 安全配置实战
人工智能·安全·ai·语言模型
m0_敲代码的彭于晏16815 小时前
OpenCode 2.0 智能编程效果全景展示
人工智能·python·语言模型
江屿风18 小时前
【Plain Language Large Model】【大语言模型底层原理全解析:从Token生成到智能体演进】流食般投喂
人工智能·笔记·语言模型·llm·json·token·聊天模板
硅谷秋水18 小时前
VLMeg:把 VLM 从奖励回归器变成成功检测器
人工智能·机器学习·语言模型·数据挖掘·机器人
隔窗听雨眠19 小时前
小模型大分工:小语言模型如何重塑RAG系统的架构逻辑
人工智能·语言模型·架构
跟我学机器学习2 天前
拥有短期记忆的RAG Agent:记忆增强检索实战
人工智能·深度学习·语言模型·数据挖掘·rag
云上工程笔记2 天前
2026年企业如何根据Token用量评估大模型服务成本?计费公式与预算模型指南
人工智能·语言模型
BD_Marathon2 天前
【RAG开发】LangChain调用大语言模型
人工智能·语言模型·langchain
Yunovian3 天前
Flash 大模型是什么,它是如何重构计算成本与智能能力的关系的
人工智能·ai·语言模型
xiaoye-duck3 天前
《C++ 项目:手写大模型接入 SDK》云端 API 调用基础与 Apifox 调试实战
网络·c++·语言模型