forked from lm-sys/FastChat
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun_base.sh
executable file
·29 lines (28 loc) · 958 Bytes
/
run_base.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
#! /bin/bash
export TRANSFORMERS_CACHE='/scratch/bbjn/sharma3/huggingface'
echo "Running Model"
torchrun --nproc_per_node=4 --master_port=20001 fastchat/train/train_mem.py \
--model_name_or_path meta-llama/Llama-2-13b-hf \
--data_path data/dummy_conversation.json \
--bf16 True \
--output_dir output_llama2_13b \
--num_train_epochs 3 \
--per_device_train_batch_size 1 \
--per_device_eval_batch_size 1 \
--gradient_accumulation_steps 1 \
--evaluation_strategy "no" \
--save_strategy "steps" \
--save_steps 1200 \
--save_total_limit 10 \
--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 \
--model_max_length 512 \
--gradient_checkpointing True \
--sharded_ddp simple \
--lazy_preprocess True