forked from FreedomIntelligence/LLMZoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrain_chimera_7b.sh
32 lines (31 loc) · 877 Bytes
/
train_chimera_7b.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
model_name_or_path=llama_hf_7b
model_max_length=2048
data_path=data/data.json
output_dir=checkpoints/chimera_7b/
torchrun \
--nnodes=1 \
--nproc_per_node=8 \
--master_port=12375 \
train_fast.py \
--model_name_or_path ${model_name_or_path} \
--model_max_length ${model_max_length} \
--data_path ${data_path} \
--output_dir ${output_dir} \
--bf16 True \
--num_train_epochs 3 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--gradient_accumulation_steps 8 \
--save_strategy "steps" \
--save_steps 500 \
--evaluation_strategy "no" \
--save_total_limit 3 \
--learning_rate 2e-5 \
--weight_decay 0. \
--warmup_ratio 0.03 \
--lr_scheduler_type "cosine" \
--logging_steps 1 \
--fsdp "full_shard auto_wrap" \
--fsdp_transformer_layer_cls_to_wrap 'LlamaDecoderLayer' \
--tf32 True \
--gradient_checkpointing True