CoolFace
Apppublic

LanguageBind/Video-LLaVA

sourceHugging Faceapache-2.0updated 3y agoView on Hugging Face
234likes
finetune.sh49 linesDownload Raw Back to scripts
1#!/bin/bash2 3# IMPORTANT: this is the training script for the original LLaVA, NOT FOR LLaVA V1.5!4 5# Uncomment and set the following variables correspondingly to run this script:6 7################## VICUNA ##################8# PROMPT_VERSION=v19# MODEL_VERSION="vicuna-v1-3-7b"10################## VICUNA ##################11 12################## LLaMA-2 ##################13# PROMPT_VERSION="llava_llama_2"14# MODEL_VERSION="llama-2-7b-chat"15################## LLaMA-2 ##################16 17deepspeed llava/train/train_mem.py \18    --deepspeed ./scripts/zero2.json \19    --model_name_or_path ./checkpoints/$MODEL_VERSION \20    --version $PROMPT_VERSION \21    --data_path ./playground/data/llava_instruct_80k.json \22    --image_folder /path/to/coco/train2017 \23    --vision_tower openai/clip-vit-large-patch14 \24    --pretrain_mm_mlp_adapter ./checkpoints/llava-$MODEL_VERSION-pretrain/mm_projector.bin \25    --mm_vision_select_layer -2 \26    --mm_use_im_start_end False \27    --mm_use_im_patch_token False \28    --bf16 True \29    --output_dir ./checkpoints/llava-$MODEL_VERSION-finetune \30    --num_train_epochs 1 \31    --per_device_train_batch_size 16 \32    --per_device_eval_batch_size 4 \33    --gradient_accumulation_steps 1 \34    --evaluation_strategy "no" \35    --save_strategy "steps" \36    --save_steps 50000 \37    --save_total_limit 1 \38    --learning_rate 2e-5 \39    --weight_decay 0. \40    --warmup_ratio 0.03 \41    --lr_scheduler_type "cosine" \42    --logging_steps 1 \43    --tf32 True \44    --model_max_length 2048 \45    --gradient_checkpointing True \46    --dataloader_num_workers 4 \47    --lazy_preprocess True \48    --report_to wandb49