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

相关推荐
官能5 天前
从 ReAct 到 LangGraph:房产 Agent 的工作流升级复盘
人工智能·语言模型
小马过河R5 天前
OpenClaw 记忆系统工作原理
人工智能·机器学习·语言模型·agent·openclaw·智能体记忆机制
硅谷秋水5 天前
从机制角度看视频生成作为世界模型:状态与动态
深度学习·机器学习·计算机视觉·语言模型·机器人
摘星编程5 天前
大语言模型(Large Language Models,LLM)如何颠覆未来:深入解析应用、挑战与趋势
人工智能·语言模型·自然语言处理
zhangfeng11336 天前
快速验证哪个文件坏了 模型文件损坏或不完整大语言模型开发 .llm
人工智能·chrome·语言模型
nudt_qxx6 天前
讲透Transformer(六):FlashAttention 1→4 进化史:从在线Softmax到硬件极致利用
语言模型·transformer
Olivia_0_0_6 天前
【大语言模型系列】MCP——大模型工具调用的“统一接口”
人工智能·语言模型
~kiss~6 天前
高性能大语言模型推理与服务框架(推理引擎)vLLM
人工智能·语言模型·vllm
renhongxia16 天前
THINKSAFE:推理模型的自生成安全对齐
人工智能·深度学习·安全·语言模型·机器人·知识图谱
shangjian0076 天前
AI-大语言模型LLM-LangChainV1.0学习笔记-OpenAI类和ChatOpenAI类
人工智能·学习·语言模型