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.

相关推荐
还不秃顶的计科生3 小时前
具身智能论文学习8:Octo: An Open-Source Generalist Robot Policy
人工智能·深度学习·学习·机器学习·语言模型·vla·vlm
怦怦蓝4 天前
给AI装上“眼睛”:一文讲透视觉语言模型(VLM)
人工智能·语言模型·自然语言处理·vlm
山顶夕景8 天前
【全模态】音视频理解模型Audio-Visual Flamingo
音视频·video·vlm·多模态理解
liferecords15 天前
HPD-Parsing: Hierarchical Parallel Document Parsing
人工智能·算法·ocr·idp·vlm
-cywen-23 天前
QWen-VL
vlm
山顶夕景1 个月前
【AAAI 2026】VQAThinker:通过RL进行可解释VQA训练
rl·vqa·vlm·grpo·视频质量评估
山顶夕景1 个月前
【VLM】视频理解LLaVA-OneVision-2(Codec-stream)
vlm·rope·视频理解·多模态理解·长视频·token压缩
_张一凡2 个月前
【AIGC行业前沿】2026年6月AIGC行业前沿模型发布动态(6月8日-6月14日)
llm·aigc·vlm·aigc前沿资讯·前沿资讯
mex_wayne2 个月前
VLM (1): VLM 一般知识点总结 + VLM重点梳理
vlm
超人也会哭️呀2 个月前
视觉模型中的坐标漂移
人工智能·ai·llm·ocr·vlm·视觉模型·dots.ocr