-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfigs.py
More file actions
83 lines (74 loc) · 1.78 KB
/
configs.py
File metadata and controls
83 lines (74 loc) · 1.78 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# RoBERTa config for all tasks
ROBERTA_UNK_CONFIG = {
"strategy": "unk_replacement",
"batch_size": 128,
"unk_token": "<unk>",
"seed": 1111,
}
ROBERTA_DEL_CONFIG = {
"strategy": "delete",
"batch_size": 128,
"seed": 1111,
}
ROBERTA_RESAMPLING_CONFIG = {
"strategy": "bert_lm_sampling",
"std": False,
"cuda_device": 0,
"bert_model": "bert-base-uncased",
"batch_size": 128,
"n_samples": 100,
"verbose": False,
"seed": 1111,
}
ROBERTA_RESAMPLING_STD_CONFIG = {
"strategy": "bert_lm_sampling",
"std": True,
"cuda_device": 0,
"bert_model": "bert-base-uncased",
"batch_size": 128,
"n_samples": 100,
"verbose": False,
"seed": 1111,
}
ROBERTA_GRADIENT_CONFIG = {
"strategy": "gradient",
"batch_size": 2,
"seed": 1111,
}
# SST2 for AllenNLP
SST2_UNK_CONFIG = {
"strategy": "unk_replacement",
"batch_size": 128,
"unk_token": "__unk__",
"seed": 1111,
}
SST2_DEL_CONFIG = {
"strategy": "delete",
"batch_size": 128,
"seed": 1111,
}
SST2_RESAMPLING_CONFIG = {
"strategy": "bert_lm_sampling",
"std": False,
"cuda_device": 0,
"bert_model": "bert-base-uncased",
"batch_size": 128,
"n_samples": 100,
"verbose": False,
"seed": 1111,
}
SST2_RESAMPLING_STD_CONFIG = {
"strategy": "bert_lm_sampling",
"std": True,
"cuda_device": 0,
"bert_model": "bert-base-uncased",
"batch_size": 128,
"n_samples": 100,
"verbose": False,
"seed": 1111,
}
SST2_GRADIENT_CONFIG = {
"strategy": "gradient",
"batch_size": 2,
"seed": 1111,
}