-
Notifications
You must be signed in to change notification settings - Fork 327
/
ds_finetune_superglue.sh
46 lines (41 loc) · 1.38 KB
/
ds_finetune_superglue.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
DATA_ROOT=/dataset/fd5061f6/tuteng/BlockLM/data
CHECKPOINT_PATH=/dataset/fd5061f6/english_data/checkpoints
SAVE_PATH=/dataset/fd5061f6/tuteng/BlockLM/finetune_checkpoints
DATESTR=$(date +"%m-%d-%H-%M")
source $1 # Model
source $2 # Task
NUM_WORKERS=1
NUM_GPUS_PER_WORKER=8
MP_SIZE=1
MASTER_PORT=$(shuf -n 1 -i 10000-65535)
OPTIONS_NCCL="NCCL_DEBUG=info NCCL_IB_DISABLE=0 NCCL_NET_GDR_LEVEL=2"
DISTRIBUTED_ARGS="${OPTIONS_NCCL} deepspeed --master_port $MASTER_PORT --num_nodes ${NUM_WORKERS} --num_gpus ${NUM_GPUS_PER_WORKER}"
EXPERIMENT_NAME=${EXPERIMENT_NAME}_${DATESTR}
mkdir logs
run_cmd="${DISTRIBUTED_ARGS} finetune_glm.py \
--deepspeed \
--deepspeed_config config_tasks/config_blocklm_10B.json \
--finetune \
--cloze-eval \
--experiment-name ${EXPERIMENT_NAME} \
--task ${TASK_NAME} \
--data-dir ${DATA_PATH} \
--save ${CHECKPOINT_PATH} \
--seq-length ${MAX_SEQ_LEN} \
--checkpoint-activations \
--eval-batch-size 16 \
--save-epoch 100000 \
--num-workers 1 \
--no-load-optim \
--no-load-lr-scheduler \
$MODEL_ARGS \
$TRAIN_ARGS \
$COMMON_ARGS \
--pattern-id 0 \
--fp16 \
--model-parallel-size ${MP_SIZE} \
--epochs ${XXLARGE_EPOCH} \
--overwrite \
2>&1 | tee logs/log-${EXPERIMENT_NAME}.txt"
echo ${run_cmd}
eval ${run_cmd}