edaiofficial's picture
initial commits
78aa4ee
name: "frswc_transformer"
data:
src: "fr"
trg: "swc"
train: "data/frswc/train.bpe"
dev: "data/frswc/dev.bpe"
test: "data/frswc/test.bpe"
level: "bpe"
lowercase: False
max_sent_length: 100
src_vocab: "data/frswc/vocab.txt"
trg_vocab: "data/frswc/vocab.txt"
testing:
beam_size: 5
alpha: 1.0
training:
#load_model: "fr-swc-baseline_v2/models/frswc_transformer/1.ckpt" # if uncommented, load a pre-trained model from this checkpoint
random_seed: 42
optimizer: "adam"
normalization: "tokens"
adam_betas: [0.9, 0.999]
scheduling: "plateau" # TODO: try switching from plateau to Noam scheduling
patience: 5 # For plateau: decrease learning rate by decrease_factor if validation score has not improved for this many validation rounds.
learning_rate_factor: 0.5 # factor for Noam scheduler (used with Transformer)
learning_rate_warmup: 1000 # warmup steps for Noam scheduler (used with Transformer)
decrease_factor: 0.7
loss: "crossentropy"
learning_rate: 0.0003
learning_rate_min: 0.00000001
weight_decay: 0.0
label_smoothing: 0.1
batch_size: 4096
batch_type: "token"
eval_batch_size: 3600
eval_batch_type: "token"
batch_multiplier: 1
early_stopping_metric: "ppl"
epochs: 50 # TODO: Decrease for when playing around and checking of working. Around 30 is sufficient to check if its working at all
validation_freq: 1000 # TODO: Set to at least once per epoch.
logging_freq: 100
eval_metric: "bleu"
model_dir: "models/frswc_transformer"
overwrite: False # TODO: Set to True if you want to overwrite possibly existing models.
shuffle: True
use_cuda: True
max_output_length: 100
print_valid_sents: [0, 1, 2, 3, 10, 15, 20, 30, 35]
keep_last_ckpts: 3
model:
initializer: "xavier"
bias_initializer: "zeros"
init_gain: 1.0
embed_initializer: "xavier"
embed_init_gain: 1.0
tied_embeddings: True
tied_softmax: True
encoder:
type: "transformer"
num_layers: 6
num_heads: 8 # TODO: Increase to 8 for larger data.
embeddings:
embedding_dim: 512 # TODO: Increase to 512 for larger data.
scale: True
dropout: 0.2
# typically ff_size = 4 x hidden_size
hidden_size: 512 # TODO: Increase to 512 for larger data.
ff_size: 2048 # TODO: Increase to 2048 for larger data.
dropout: 0.3
decoder:
type: "transformer"
num_layers: 6
num_heads: 8 # TODO: Increase to 8 for larger data.
embeddings:
embedding_dim: 512 # TODO: Increase to 512 for larger data.
scale: True
dropout: 0.2
# typically ff_size = 4 x hidden_size
hidden_size: 512 # TODO: Increase to 512 for larger data.
ff_size: 2048 # TODO: Increase to 2048 for larger data.
dropout: 0.3