ptuning_train.sh 882 Bytes
Newer Older
dcuai's avatar
dcuai committed
1
PRE_SEQ_LEN=128
zhaoying1's avatar
zhaoying1 committed
2
3
LR=5e-3

zhaoying1's avatar
zhaoying1 committed
4
5
6
export HSA_FORCE_FINE_GRAIN_PCIE=1
export NCCL_P2P_LEVEL=5
export NCCL_MIN_NCHANNELS=20
zhaoying1's avatar
zhaoying1 committed
7

zhaoying1's avatar
zhaoying1 committed
8
9
MASTER_PORT=$(shuf -n 1 -i 10000-65535)
HIP_VISIBLE_DEVICES=0,1,2,3 deepspeed --num_gpus=4 --master_port $MASTER_PORT main.py \
zhaoying1's avatar
zhaoying1 committed
10
11
12
13
14
    --do_train \
    --train_file AdvertiseGen/train.json \
    --test_file AdvertiseGen/dev.json \
    --prompt_column content \
    --response_column summary \
zhaoying1's avatar
zhaoying1 committed
15
    --model_name_or_path ../model/chatglm-6b \
zhaoying1's avatar
zhaoying1 committed
16
17
    --output_dir ./output_pt/adgen-chatglm-6b-pt-4c-$LR \
    --overwrite_output_dir \
zhaoying1's avatar
zhaoying1 committed
18
19
20
    --max_source_length 512 \
    --max_target_length 512 \
    --per_device_train_batch_size 1 \
zhaoying1's avatar
zhaoying1 committed
21
22
23
    --per_device_eval_batch_size 1 \
    --gradient_accumulation_steps 1 \
    --predict_with_generate \
zhaoying1's avatar
zhaoying1 committed
24
25
    --max_steps 30 \
    --logging_steps 1 \
zhaoying1's avatar
zhaoying1 committed
26
27
28
    --save_steps 1000 \
    --learning_rate $LR \
    --pre_seq_len $PRE_SEQ_LEN \
dcuai's avatar
dcuai committed
29
    --fp16 \