forked from apple024/flexible-BERT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gate_inference.sh
56 lines (50 loc) · 1.13 KB
/
gate_inference.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
54
55
56
#!/bin/sh
TASK="RTE"
DATA_DIR="data/RTE"
WD_BERT_GATES="dynawd_bert_gates/RTE/"
echo $TASK
echo "inference"
echo "static"
python3 train_gate.py \
--model_type bert \
--task_name $TASK \
--data_dir $DATA_DIR \
--model_dir $WD_BERT_GATES \
--output_dir output/ \
--max_seq_length 128 \
--per_gpu_eval_batch_size 1 \
--width_mult_list 0.5,0.5,0.5,0.5 \
--depth_mult_list 0.5 \
--do_eval \
--record_gpu_time \
--static \
echo "width-dynamic"
python3 train_gate.py \
--model_type bert \
--task_name $TASK \
--data_dir $DATA_DIR \
--model_dir $WD_BERT_GATES \
--output_dir output/ \
--max_seq_length 128 \
--per_gpu_eval_batch_size 1 \
--width_mult_list 0.5,0.75,0.75,0.75 \
--depth_mult_list 1.0 \
--do_eval \
--record_gpu_time \
--w_dynamic \
echo "width- and depth-dynamic"
python3 train_gate.py \
--model_type bert \
--task_name $TASK \
--data_dir $DATA_DIR \
--model_dir $WD_BERT_GATES \
--output_dir output/ \
--max_seq_length 128 \
--per_gpu_eval_batch_size 1 \
--width_mult_list 0.25,0.25,0.5,0.5 \
--depth_mult_list 1.0 \
--do_eval \
--record_gpu_time \
--wd_dynamic \
--early_exit \
--exit_threshold 0.06 \