-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_glue_gazesup_bert_low_resource.sh
53 lines (50 loc) · 1.43 KB
/
run_glue_gazesup_bert_low_resource.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
47
48
49
50
51
52
53
#!/bin/bash
#rte:accuracy, epoch
#mrpc: f1, epoch
#stsb: spearmanr, epoch
#cola: matthews_correlation, epoch
#sst2: accuracy, steps
#qnli: accuracy, steps
#qqp: f1, steps
#mnli: accuracy, steps
# task_to_lr = {'rte': 2e-5,
# 'mrpc': 3e-5,
# 'stsb': 4e-5,
# 'sst2': 2e-5,
# 'cola': 2e-5,
# 'qqp': 2e-5,
# 'mnli': 2e-5,
# 'qnli': 2e-5}
export TASK_NAME=rte
export LR=2e-05
for MAX_TRAIN_SAMPLES in 200 500 1000
do
for AUG_WEIGHT in 1.0 0.7 0.5 0.3 0.1 0.01 0.001
do
for DATA_SEED in 111 222 333 444 555
do
CUDA_VISIBLE_DEVICES=3 python train_glue_gazesup_bert_low_resource.py \
--model_name_or_path bert-base-cased \
--task_name $TASK_NAME \
--output_dir result/gazesup_bert/rte/$MAX_TRAIN_SAMPLES/$AUG_WEIGHT/$DATA_SEED/ \
--num_train_epochs 20 \
--learning_rate $LR \
--per_device_train_batch_size 32 \
--max_seq_length 128 \
--augweight $AUG_WEIGHT \
--evaluation_strategy epoch \
--save_strategy epoch \
--metric_for_best_model accuracy \
--train_as_val True \
--max_train_samples $MAX_TRAIN_SAMPLES\
--low_resource_data_seed $DATA_SEED \
--load_best_model_at_end \
--overwrite_output_dir \
--do_train \
--do_eval \
--do_predict False\
--fp16 \
"$@"
done
done
done