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.

相关推荐
山顶夕景11 小时前
【VLA】Qwen-VLA:VLM+DiT统一多模态理解与连续机器人动作生成
机器人·多模态·扩散模型·具身智能·vla·dit·vlm
一直在努力的小宁6 天前
【阅读笔记】具身智能的真机数采,到了分水岭
人工智能·深度学习·机器学习·agent·具身智能·vlm·vln
Robot_Nav6 天前
ICRA 2025|LocoVLM:视觉与语言驱动的通用足式运动策略自适应【文献解读】
四足机器人·vlm·locovlm
一直在努力的小宁6 天前
【阅读笔记】具身操作的数采方案概览
后端·json·restful·具身智能·vla·vlm
一颗小树x16 天前
vLLM大模型推理:Jetson AGX Thor 的 GPU 共享内存清理实战
jetson·vllm·vlm·gpu内存清理
山顶夕景18 天前
【VLM】Qwen3.8-Omni-Flash长音视频理解Agentic模型
音视频·vlm·视频理解·agentic·全模态
程序猿编码18 天前
不用 GPU!RK3588 跑视觉大模型,Qwen3.5-2B VLM 端侧落地
大模型·llm·rk3588·qwen·推理·vlm
Robot_Nav21 天前
前沿 | VLA 演进:从动作 Token 到分层具身智能体
具身智能·vla·vlm
一直在努力的小宁21 天前
[特殊字符] 具身智能Agent开发调研|零基础超详细笔记(万字长文)
agent·vla·vlm·vln·harness
山顶夕景1 个月前
【Omni】OmniGAIA: Towards Native Omni-Modal AI Agents
agent·多模态·vlm·omni·全模态