forked from ruizheng20/robust_ticket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stage2-search-ticket.sh
62 lines (58 loc) · 1.14 KB
/
stage2-search-ticket.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
57
58
59
60
61
62
#!/bin/bash
export CUDA_DEVICE_ORDER=PCI_BUS_ID
export CUDA_VISIBLE_DEVICES=0
cpkt='./save_models/search_ticket/' # search tickets saving path
log_file='search_ticket.log'
epoch=20
# IMDB
model_path='./your_fine-tune_path/'
lr=0.1
amp=0.5
step=5
python search_ticket.py \
--model_name ${model_path} \
--lr $lr \
--dataset_name imdb \
--num_labels 2 \
--bsz 32 \
--max_seq_length 256 \
--lambda_amp $amp \
--ckpt_dir ${cpkt} \
--weight_decay 1e-6 \
--adv_steps $step \
--epochs $epoch >> ${log_file}
# AGNEWS
model_path='./your_fine-tune_path/'
lr=0.05
amp=0.5
step=5
python search_ticket.py \
--model_name ${model_path} \
--lr $lr \
--dataset_name ag_news \
--num_labels 4 \
--bsz 32 \
--max_seq_length 256 \
--lambda_amp $amp \
--ckpt_dir ${cpkt} \
--weight_decay 1e-6 \
--adv_steps $step \
--epochs $epoch >> ${log_file}
# SST-2
model_path='./your_fine-tune_path/'
lr=0.1
amp=0.5
step=5
python search_ticket.py \
--model_name ${model_path} \
--lr $lr \
--dataset_name glue \
--task_name sst2 \
--num_labels 2 \
--bsz 32 \
--max_seq_length 128 \
--lambda_amp $amp \
--ckpt_dir ${cpkt} \
--weight_decay 1e-6 \
--adv_steps $step \
--epochs $epoch >> ${log_file}