Finetune LLaVA on Custom Datasets

Dataset Format

Convert your data to a JSON file of a List of all samples. Sample metadata should contain id (a unique identifier), image (the path to the image), and conversations (the conversation data between human and AI).

A sample JSON for finetuning LLaVA for generating tag-style captions for Stable Diffusion:

json 复制代码
[
  {
    "id": "997bb945-628d-4724-b370-b84de974a19f",
    "image": "part-000001/997bb945-628d-4724-b370-b84de974a19f.jpg",
    "conversations": [
      {
        "from": "human",
        "value": "<image>\nWrite a prompt for Stable Diffusion to generate this image."
      },
      {
        "from": "gpt",
        "value": "a beautiful painting of chernobyl by nekro, pascal blanche, john harris, greg rutkowski, sin jong hun, moebius, simon stalenhag. in style of cg art. ray tracing. cel shading. hyper detailed. realistic. ue 5. maya. octane render. "
      },
    ]
  },
  ...
]

Command

If you have a limited task-specific data, we recommend finetuning from LLaVA checkpoints with LoRA following this script.

If the amount of the task-specific data is sufficient, you can also finetune from LLaVA checkpoints with full-model finetuning following this script.

You may need to adjust the hyperparameters to fit each specific dataset and your hardware constraint.

相关推荐
-cywen-1 天前
QWen-VL
vlm
山顶夕景19 天前
【AAAI 2026】VQAThinker:通过RL进行可解释VQA训练
rl·vqa·vlm·grpo·视频质量评估
山顶夕景20 天前
【VLM】视频理解LLaVA-OneVision-2(Codec-stream)
vlm·rope·视频理解·多模态理解·长视频·token压缩
_张一凡1 个月前
【AIGC行业前沿】2026年6月AIGC行业前沿模型发布动态(6月8日-6月14日)
llm·aigc·vlm·aigc前沿资讯·前沿资讯
mex_wayne1 个月前
VLM (1): VLM 一般知识点总结 + VLM重点梳理
vlm
超人也会哭️呀2 个月前
视觉模型中的坐标漂移
人工智能·ai·llm·ocr·vlm·视觉模型·dots.ocr
_张一凡2 个月前
【AIGC行业前沿】2026年5月AIGC行业前沿模型发布动态(5月25-5月31)
llm·aigc·vlm·前沿资讯
feasibility.2 个月前
ROS2+Gazebo+VLM服务:纯仿真环境下的具身智能闭环系统| 大脑-小脑分离控制
人工智能·机器人·ros·仿真·具身智能·vla·vlm
feasibility.2 个月前
Qwen3-VL-Seg 深度解读:当多模态大模型学会“像素级精准手术“
人工智能·深度学习·计算机视觉·llm·图像分割·多模态·vlm
feasibility.2 个月前
多模态模型Qwen-3.5在Llama-Factory使用+llama.cpp量化导出+部署流程(含报错处理)
人工智能·llm·多模态·量化·llama.cpp·vlm·llama-factory