Commit b7fdc1ae authored by wanglch's avatar wanglch
Browse files

Update finetune_ds.sh

parent a0963d66
...@@ -6,11 +6,11 @@ NODE_RANK=0 ...@@ -6,11 +6,11 @@ NODE_RANK=0
MASTER_ADDR=localhost MASTER_ADDR=localhost
MASTER_PORT=6001 MASTER_PORT=6001
MODEL="openbmb/MiniCPM-Llama3-V-2_5" # or openbmb/MiniCPM-V-2 MODEL="XXXXXXX/MiniCPM-Llama3-V-2_5" # or openbmb/MiniCPM-V-2
# ATTENTION: specify the path to your training data, which should be a json file consisting of a list of conversations. # ATTENTION: specify the path to your training data, which should be a json file consisting of a list of conversations.
# See the section for finetuning in README for more information. # See the section for finetuning in README for more information.
DATA="path/to/trainging_data" DATA="/home/wanglch/MiniCPM-V/data/self_build/train_data/train_data.json"
EVAL_DATA="path/to/test_data" EVAL_DATA="/home/wanglch/MiniCPM-V/data/self_build/eval_data/eval_data.json"
LLM_TYPE="llama3" # if use openbmb/MiniCPM-V-2, please set LLM_TYPE=minicpm LLM_TYPE="llama3" # if use openbmb/MiniCPM-V-2, please set LLM_TYPE=minicpm
DISTRIBUTED_ARGS=" DISTRIBUTED_ARGS="
...@@ -28,20 +28,18 @@ torchrun $DISTRIBUTED_ARGS finetune.py \ ...@@ -28,20 +28,18 @@ torchrun $DISTRIBUTED_ARGS finetune.py \
--remove_unused_columns false \ --remove_unused_columns false \
--label_names "labels" \ --label_names "labels" \
--prediction_loss_only false \ --prediction_loss_only false \
--bf16 false \ --bf16 true \
--bf16_full_eval false \ --bf16_full_eval true \
--fp16 true \
--fp16_full_eval true \
--do_train \ --do_train \
--do_eval \ --do_eval \
--tune_vision true \ --tune_vision true \
--tune_llm true \ --tune_llm true \
--model_max_length 2048 \ --model_max_length 2048 \
--max_slice_nums 9 \ --max_slice_nums 9 \
--max_steps 10000 \ --max_steps 100 \
--eval_steps 1000 \ --eval_steps 10 \
--output_dir output/output_minicpmv2 \ --output_dir "/home/wanglch/MiniCPM-V/saves/MiniCPM-Llama3-V-2_5/train_lora/" \
--logging_dir output/output_minicpmv2 \ --logging_dir "/home/wanglch/MiniCPM-V/saves/MiniCPM-Llama3-V-2_5/train_lora/" \
--logging_strategy "steps" \ --logging_strategy "steps" \
--per_device_train_batch_size 1 \ --per_device_train_batch_size 1 \
--per_device_eval_batch_size 1 \ --per_device_eval_batch_size 1 \
...@@ -57,5 +55,5 @@ torchrun $DISTRIBUTED_ARGS finetune.py \ ...@@ -57,5 +55,5 @@ torchrun $DISTRIBUTED_ARGS finetune.py \
--lr_scheduler_type "cosine" \ --lr_scheduler_type "cosine" \
--logging_steps 1 \ --logging_steps 1 \
--gradient_checkpointing true \ --gradient_checkpointing true \
--deepspeed ds_config_zero2.json \ --deepspeed ds_config_zero3.json \
--report_to "tensorboard" --report_to "tensorboard"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment