mahsaamani
commited on
Commit
•
2ebe18c
1
Parent(s):
a14df43
Upload config.yaml
Browse files- config.yaml +117 -0
config.yaml
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
name: "data_sp"
|
3 |
+
joeynmt_version: "2.0.0"
|
4 |
+
|
5 |
+
data:
|
6 |
+
train: "RESULTS_azb2fa/data/train"
|
7 |
+
dev: "RESULTS_azb2fa/data/validation"
|
8 |
+
test: "RESULTS_azb2fa/data/test"
|
9 |
+
dataset_type: "huggingface"
|
10 |
+
sample_dev_subset: 200
|
11 |
+
src:
|
12 |
+
lang: "azb"
|
13 |
+
max_length: 100
|
14 |
+
lowercase: False
|
15 |
+
normalize: False
|
16 |
+
level: "bpe"
|
17 |
+
voc_limit: 2000
|
18 |
+
voc_min_freq: 1
|
19 |
+
voc_file: "RESULTS_azb2fa/data/vocab.txt"
|
20 |
+
tokenizer_type: "sentencepiece"
|
21 |
+
tokenizer_cfg:
|
22 |
+
model_file: "RESULTS_azb2fa/data/sp.model"
|
23 |
+
|
24 |
+
trg:
|
25 |
+
lang: "fa"
|
26 |
+
max_length: 100
|
27 |
+
lowercase: False
|
28 |
+
normalize: False
|
29 |
+
level: "bpe"
|
30 |
+
voc_limit: 2000
|
31 |
+
voc_min_freq: 1
|
32 |
+
voc_file: "RESULTS_azb2fa/data/vocab.txt"
|
33 |
+
tokenizer_type: "sentencepiece"
|
34 |
+
tokenizer_cfg:
|
35 |
+
model_file: "RESULTS_azb2fa/data/sp.model"
|
36 |
+
|
37 |
+
|
38 |
+
testing:
|
39 |
+
n_best: 1
|
40 |
+
beam_size: 5
|
41 |
+
beam_alpha: 1.0
|
42 |
+
batch_size: 512
|
43 |
+
batch_type: "token"
|
44 |
+
max_output_length: 100
|
45 |
+
eval_metrics: ["bleu"]
|
46 |
+
#return_prob: "hyp"
|
47 |
+
#return_attention: False
|
48 |
+
sacrebleu_cfg:
|
49 |
+
tokenize: "13a"
|
50 |
+
|
51 |
+
training:
|
52 |
+
#load_model: "RESULTS_azb2fa/model/latest.ckpt"
|
53 |
+
#reset_best_ckpt: False
|
54 |
+
#reset_scheduler: False
|
55 |
+
#reset_optimizer: False
|
56 |
+
#reset_iter_state: False
|
57 |
+
random_seed: 42
|
58 |
+
optimizer: "adam"
|
59 |
+
normalization: "tokens"
|
60 |
+
adam_betas: [0.9, 0.999]
|
61 |
+
scheduling: "warmupinversesquareroot"
|
62 |
+
learning_rate_warmup: 2000
|
63 |
+
learning_rate: 0.0002
|
64 |
+
learning_rate_min: 0.00000001
|
65 |
+
weight_decay: 0.0
|
66 |
+
label_smoothing: 0.1
|
67 |
+
loss: "crossentropy"
|
68 |
+
batch_size: 512
|
69 |
+
batch_type: "token"
|
70 |
+
batch_multiplier: 4
|
71 |
+
early_stopping_metric: "bleu"
|
72 |
+
epochs: 500
|
73 |
+
updates: 2000000000
|
74 |
+
validation_freq: 1000
|
75 |
+
logging_freq: 100
|
76 |
+
model_dir: "RESULTS_azb2fa/model"
|
77 |
+
overwrite: True
|
78 |
+
shuffle: True
|
79 |
+
use_cuda: True
|
80 |
+
print_valid_sents: [0, 1, 2, 3]
|
81 |
+
keep_best_ckpts: 3
|
82 |
+
|
83 |
+
model:
|
84 |
+
initializer: "xavier"
|
85 |
+
bias_initializer: "zeros"
|
86 |
+
init_gain: 1.0
|
87 |
+
embed_initializer: "xavier"
|
88 |
+
embed_init_gain: 1.0
|
89 |
+
tied_embeddings: True
|
90 |
+
tied_softmax: True
|
91 |
+
encoder:
|
92 |
+
type: "transformer"
|
93 |
+
num_layers: 2
|
94 |
+
num_heads: 4
|
95 |
+
embeddings:
|
96 |
+
embedding_dim: 256
|
97 |
+
scale: True
|
98 |
+
dropout: 0.2
|
99 |
+
# typically ff_size = 4 x hidden_size
|
100 |
+
hidden_size: 256
|
101 |
+
ff_size: 1024
|
102 |
+
dropout: 0.1
|
103 |
+
layer_norm: "pre"
|
104 |
+
decoder:
|
105 |
+
type: "transformer"
|
106 |
+
num_layers: 2
|
107 |
+
num_heads: 8
|
108 |
+
embeddings:
|
109 |
+
embedding_dim: 256
|
110 |
+
scale: True
|
111 |
+
dropout: 0.2
|
112 |
+
# typically ff_size = 4 x hidden_size
|
113 |
+
hidden_size: 256
|
114 |
+
ff_size: 1024
|
115 |
+
dropout: 0.1
|
116 |
+
layer_norm: "pre"
|
117 |
+
|