-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel.cfg
227 lines (193 loc) · 4.95 KB
/
model.cfg
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
datapath = ../e2e-Dutch/data
# Word embeddings.
glove_300d {
path = ${datapath}/glove.840B.300d.txt
size = 300
}
glove_300d_filtered {
path = ${datapath}/glove.840B.300d.txt.filtered
size = 300
}
glove_300d_2w {
path = ${datapath}/glove_50_300_2.txt
size = 300
}
dutch_combined_320 {
path = ${datapath}/combined-320.txt
size = 320
}
dutch_combined_320_filtered {
path = ${datapath}/combined-320.txt.filtered
size = 320
}
dutch_uncased_320 {
path = ${datapath}/combined-320.txt
size = 320
cased = false
}
dutch_uncased_320_filtered {
path = ${datapath}/combined-320.txt.filtered
size = 320
cased = false
}
dutch_fasttext_100 {
path = ${datapath}/fasttext.100.model.vec
size = 100
cased = false
}
dutch_fasttext_100_filtered {
path = ${datapath}/fasttext.100.model.vec.filtered
size = 100
cased = false
}
dutch_fasttext_300 {
path = ${datapath}/fasttext.300.vec
size = 300
cased = true
}
dutch_fasttext_300_filtered {
path = ${datapath}/fasttext.300.vec.filtered
size = 300
cased = true
}
# Distributed training configurations.
two_local_gpus {
addresses {
ps = [localhost:2222]
worker = [localhost:2223, localhost:2224]
}
gpus = [0, 1]
}
# Main configuration.
best {
# Computation limits.
max_top_antecedents = 30
max_training_sentences = 30
top_span_ratio = 0.4
# Model hyperparameters.
filter_widths = [3, 4, 5]
filter_size = 50
char_embedding_size = 8
char_vocab_path = ${datapath}/char_vocab.dutch.txt
context_embeddings = ${dutch_fasttext_300_filtered}
head_embeddings = ${dutch_fasttext_300_filtered}
contextualization_size = 200
contextualization_layers = 3
ffnn_size = 150
ffnn_depth = 2
feature_size = 20
max_span_width = 30
use_metadata = false
use_features = true
model_heads = true
coref_depth = 2
lm_layers = 1
lm_size = 768
coarse_to_fine = true
# Learning hyperparameters.
max_gradient_norm = 5.0
lstm_dropout_rate = 0.4
lexical_dropout_rate = 0.5
dropout_rate = 0.2
optimizer = adam
learning_rate = 0.001
decay_rate = 0.999
decay_frequency = 100
# Other.
train_path = ${datapath}/train.dutch.jsonlines
eval_path = ${datapath}/dev.dutch.jsonlines
conll_eval_path = ${datapath}/dev.dutch.conll
# lm_path = False
lm_model_name = "bertje"
lm_path = ${datapath}/bertje_cache.hdf5
genres = ["all"]
eval_frequency = 5000
report_frequency = 100
use_gold = false
log_root = ../e2e-Dutch/logs
cluster = ${two_local_gpus}
}
test = ${best} {
eval_frequency = 5
report_frequency = 1
train_path = ${datapath}/train-small.dutch.jsonlines
eval_path = ${datapath}/dev-small.dutch.jsonlines
conll_eval_path = ${datapath}/dev-small.dutch.conll
}
bertje_fasttext = ${best} {
eval_path = ${datapath}/dev-short.dutch.jsonlines
conll_eval_path = ${datapath}/dev-short.dutch.conll
}
bertje_w2v = ${best} {
context_embeddings = ${dutch_uncased_320_filtered}
head_embeddings = ${dutch_uncased_320_filtered}
eval_path = ${datapath}/dev-short.dutch.jsonlines
conll_eval_path = ${datapath}/dev-short.dutch.conll
}
bertje_w2v_eval = ${bertje_w2v} {
context_embeddings = ${dutch_uncased_320}
head_embeddings = ${dutch_uncased_320}
eval_path = ${datapath}/dev.dutch.jsonlines
conll_eval_path = ${datapath}/dev.dutch.conll
}
robbert_fasttext = ${best} {
lm_model_name = "robbert"
lm_path = ${datapath}/robbert_cache.hdf5
eval_path = ${datapath}/dev-short.dutch.jsonlines
conll_eval_path = ${datapath}/dev-short.dutch.conll
}
best_goldmentions = ${best} {
eval_path = ${datapath}/dev.mentions.jsonlines
conll_eval_path = ${datapath}/dev.mentions.gold.conll
use_gold = True
lm_path = ""
context_embeddings = ${dutch_fasttext_300}
head_embeddings = ${dutch_fasttext_300}
}
bertnl_fasttext = ${best} {
lm_model_name = "bert-nl"
lm_path = ${datapath}/bert-nl_cache.hdf5
eval_path = ${datapath}/dev-short.dutch.jsonlines
conll_eval_path = ${datapath}/dev-short.dutch.conll
}
bertje_fasttext100 = ${best} {
context_embeddings = ${dutch_fasttext_100_filtered}
head_embeddings = ${dutch_fasttext_100_filtered}
eval_path = ${datapath}/dev-short.dutch.jsonlines
conll_eval_path = ${datapath}/dev-short.dutch.conll
}
# For evaluation. Do not use for training (i.e. only for predict.py, evaluate.py, and demo.py). Rename `best` directory to `final`.
final = ${best} {
context_embeddings = ${dutch_fasttext_300}
head_embeddings = ${dutch_fasttext_300}
lm_path = ""
eval_path = test.dutch.jsonlines
conll_eval_path = test.dutch.conll
}
gold_mentions = ${final} {
use_gold = True
}
# Baselines.
c2f_100_ant = ${best} {
max_top_antecedents = 100
}
c2f_250_ant = ${best} {
max_top_antecedents = 250
}
c2f_1_layer = ${best} {
coref_depth = 1
}
c2f_3_layer = ${best} {
coref_depth = 3
}
distance_50_ant = ${best} {
max_top_antecedents = 50
coarse_to_fine = false
coref_depth = 1
}
distance_100_ant = ${distance_50_ant} {
max_top_antecedents = 100
}
distance_250_ant = ${distance_50_ant} {
max_top_antecedents = 250
}