Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
MiniCMP-V_pytorch
Commits
3cbf223f
Commit
3cbf223f
authored
Jun 20, 2024
by
wanglch
Browse files
Delete finetune_lora.sh
parent
1afd82d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
64 deletions
+0
-64
finetune_lora.sh
finetune_lora.sh
+0
-64
No files found.
finetune_lora.sh
deleted
100644 → 0
View file @
1afd82d1
#!/bin/bash
HIP_VISIBLE_DEVICES
=
0,1,2,3
GPUS_PER_NODE
=
4
NNODES
=
1
NODE_RANK
=
0
MASTER_ADDR
=
localhost
MASTER_PORT
=
29500
MODEL
=
"/home/wanglch/projects/MiniCPM-V/MiniCPM-Llama3-V-2_5-base"
# 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.
# See the section for finetuning in README for more information.
DATA
=
"/home/wanglch/projects/MiniCPM-V/data/self_build/train_data/train_data.json"
EVAL_DATA
=
"/home/wanglch/projects/MiniCPM-V/data/self_build/eval_data/eval_data.json"
LLM_TYPE
=
"llama3"
# if use openbmb/MiniCPM-V-2, please set LLM_TYPE=minicpm
DISTRIBUTED_ARGS
=
"
--nproc_per_node
$GPUS_PER_NODE
\
--nnodes
$NNODES
\
--node_rank
$NODE_RANK
\
--master_addr
$MASTER_ADDR
\
--master_port
$MASTER_PORT
"
torchrun
$DISTRIBUTED_ARGS
./finetune/finetune.py
\
--model_name_or_path
$MODEL
\
--llm_type
$LLM_TYPE
\
--data_path
$DATA
\
--eval_data_path
$EVAL_DATA
\
--remove_unused_columns
false
\
--label_names
"labels"
\
--prediction_loss_only
false
\
--bf16
false
\
--bf16_full_eval
false
\
--fp16
true
\
--fp16_full_eval
true
\
--do_train
\
--do_eval
\
--tune_vision
true
\
--tune_llm
false
\
--use_lora
true
\
--lora_target_modules
"llm
\.
.*layers
\.\d
+
\.
self_attn
\.
(q_proj|k_proj)"
\
--model_max_length
2048
\
--max_slice_nums
9
\
--max_steps
100
\
--eval_steps
10
\
--output_dir
/home/wanglch/projects/saves/MiniCPM-Llama3-V-2_5/lora_train_dtk
\
--logging_dir
/home/wanglch/projects/saves/MiniCPM-Llama3-V-2_5/lora_train_dtk
\
--logging_strategy
"steps"
\
--per_device_train_batch_size
2
\
--per_device_eval_batch_size
1
\
--gradient_accumulation_steps
1
\
--evaluation_strategy
"steps"
\
--save_strategy
"steps"
\
--save_steps
100
\
--save_total_limit
10
\
--learning_rate
1e-6
\
--weight_decay
0.1
\
--adam_beta2
0.95
\
--warmup_ratio
0.01
\
--lr_scheduler_type
"cosine"
\
--logging_steps
1
\
--gradient_checkpointing
true
\
--deepspeed
ds_config_zero2.json
\
--report_to
"tensorboard"
# wandb
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment