CoolFace
Apppublic

Sapiensia/LLaVA

sourceHugging Faceupdated 3y agoView on Hugging Face
1likes
pretrain.sh45 linesDownload Raw Back to scripts
1#!/bin/bash2 3# Uncomment and set the following variables correspondingly to run this script:4 5# MODEL_VERSION=vicuna-v1-3-7b6# MODEL_VERSION=llama-2-7b-chat7 8########### DO NOT CHANGE ###########9########### USE THIS FOR BOTH ###########10PROMPT_VERSION=plain11########### DO NOT CHANGE ###########12 13deepspeed llava/train/train_mem.py \14    --deepspeed ./scripts/zero2.json \15    --model_name_or_path ./checkpoints/$MODEL_VERSION \16    --version $PROMPT_VERSION \17    --data_path /path/to/pretrain_data.json \18    --image_folder /path/to/images \19    --vision_tower openai/clip-vit-large-patch14 \20    --tune_mm_mlp_adapter True \21    --mm_vision_select_layer -2 \22    --mm_use_im_start_end False \23    --mm_use_im_patch_token False \24    --bf16 True \25    --output_dir ./checkpoints/llava-$MODEL_VERSION-pretrain \26    --num_train_epochs 1 \27    --per_device_train_batch_size 16 \28    --per_device_eval_batch_size 4 \29    --gradient_accumulation_steps 1 \30    --evaluation_strategy "no" \31    --save_strategy "steps" \32    --save_steps 24000 \33    --save_total_limit 1 \34    --learning_rate 2e-3 \35    --weight_decay 0. \36    --warmup_ratio 0.03 \37    --lr_scheduler_type "cosine" \38    --logging_steps 1 \39    --tf32 True \40    --model_max_length 2048 \41    --gradient_checkpointing True \42    --dataloader_num_workers 4 \43    --lazy_preprocess True \44    --report_to wandb45