2020-05-30 21:27:47 +03:00
|
|
|
# Training hyper-parameters and additional features.
|
|
|
|
[training]
|
|
|
|
# Whether to train on sequences with 'gold standard' sentence boundaries
|
|
|
|
# and tokens. If you set this to true, take care to ensure your run-time
|
|
|
|
# data is passed in sentence-by-sentence via some prior preprocessing.
|
|
|
|
gold_preproc = false
|
|
|
|
# Limitations on training document length or number of examples.
|
2020-06-26 20:34:12 +03:00
|
|
|
max_length = 5000
|
2020-05-30 21:27:47 +03:00
|
|
|
limit = 0
|
|
|
|
# Data augmentation
|
|
|
|
orth_variant_level = 0.0
|
|
|
|
dropout = 0.1
|
|
|
|
# Controls early-stopping. 0 or -1 mean unlimited.
|
|
|
|
patience = 1600
|
|
|
|
max_epochs = 0
|
|
|
|
max_steps = 20000
|
2020-06-26 20:34:12 +03:00
|
|
|
eval_frequency = 200
|
2020-05-30 21:27:47 +03:00
|
|
|
# Other settings
|
|
|
|
seed = 0
|
|
|
|
accumulate_gradient = 1
|
|
|
|
use_pytorch_for_gpu_memory = false
|
|
|
|
# Control how scores are printed and checkpoints are evaluated.
|
|
|
|
scores = ["speed", "tags_acc", "uas", "las", "ents_f"]
|
|
|
|
score_weights = {"las": 0.4, "ents_f": 0.4, "tags_acc": 0.2}
|
|
|
|
# These settings are invalid for the transformer models.
|
|
|
|
init_tok2vec = null
|
2020-06-03 11:04:16 +03:00
|
|
|
discard_oversize = false
|
2020-06-12 03:02:07 +03:00
|
|
|
omit_extra_lookups = false
|
2020-07-10 20:59:12 +03:00
|
|
|
batch_by = "words"
|
|
|
|
use_gpu = -1
|
|
|
|
raw_text = null
|
|
|
|
tag_map = null
|
2020-05-30 21:27:47 +03:00
|
|
|
|
|
|
|
[training.batch_size]
|
|
|
|
@schedules = "compounding.v1"
|
2020-06-27 00:50:22 +03:00
|
|
|
start = 1000
|
2020-05-30 21:27:47 +03:00
|
|
|
stop = 1000
|
|
|
|
compound = 1.001
|
|
|
|
|
2020-06-03 11:04:16 +03:00
|
|
|
[training.optimizer]
|
2020-05-30 21:27:47 +03:00
|
|
|
@optimizers = "Adam.v1"
|
|
|
|
beta1 = 0.9
|
|
|
|
beta2 = 0.999
|
|
|
|
L2_is_weight_decay = true
|
|
|
|
L2 = 0.01
|
|
|
|
grad_clip = 1.0
|
2020-06-27 00:50:22 +03:00
|
|
|
use_averages = false
|
2020-05-30 21:27:47 +03:00
|
|
|
eps = 1e-8
|
2020-06-27 00:50:22 +03:00
|
|
|
#learn_rate = 0.001
|
2020-05-30 21:27:47 +03:00
|
|
|
|
2020-07-11 14:03:53 +03:00
|
|
|
[training.optimizer.learn_rate]
|
2020-06-27 00:50:22 +03:00
|
|
|
@schedules = "warmup_linear.v1"
|
|
|
|
warmup_steps = 250
|
|
|
|
total_steps = 20000
|
|
|
|
initial_rate = 0.001
|
2020-05-30 21:27:47 +03:00
|
|
|
|
|
|
|
[nlp]
|
|
|
|
lang = "en"
|
2020-07-11 14:03:53 +03:00
|
|
|
base_model = null
|
2020-06-12 03:02:07 +03:00
|
|
|
vectors = null
|
2020-05-30 21:27:47 +03:00
|
|
|
|
2020-07-11 14:03:53 +03:00
|
|
|
[nlp.pipeline]
|
|
|
|
|
2020-05-30 21:27:47 +03:00
|
|
|
[nlp.pipeline.tok2vec]
|
|
|
|
factory = "tok2vec"
|
|
|
|
|
|
|
|
|
|
|
|
[nlp.pipeline.ner]
|
|
|
|
factory = "ner"
|
2020-06-12 03:02:07 +03:00
|
|
|
learn_tokens = false
|
|
|
|
min_action_freq = 1
|
2020-05-30 21:27:47 +03:00
|
|
|
|
|
|
|
[nlp.pipeline.tagger]
|
|
|
|
factory = "tagger"
|
|
|
|
|
|
|
|
[nlp.pipeline.parser]
|
|
|
|
factory = "parser"
|
2020-06-12 03:02:07 +03:00
|
|
|
learn_tokens = false
|
2020-06-26 20:34:12 +03:00
|
|
|
min_action_freq = 30
|
2020-05-30 21:27:47 +03:00
|
|
|
|
|
|
|
[nlp.pipeline.tagger.model]
|
|
|
|
@architectures = "spacy.Tagger.v1"
|
|
|
|
|
|
|
|
[nlp.pipeline.tagger.model.tok2vec]
|
|
|
|
@architectures = "spacy.Tok2VecTensors.v1"
|
|
|
|
width = ${nlp.pipeline.tok2vec.model:width}
|
|
|
|
|
|
|
|
[nlp.pipeline.parser.model]
|
|
|
|
@architectures = "spacy.TransitionBasedParser.v1"
|
|
|
|
nr_feature_tokens = 8
|
|
|
|
hidden_width = 128
|
2020-06-26 20:34:12 +03:00
|
|
|
maxout_pieces = 2
|
|
|
|
use_upper = true
|
2020-05-30 21:27:47 +03:00
|
|
|
|
|
|
|
[nlp.pipeline.parser.model.tok2vec]
|
|
|
|
@architectures = "spacy.Tok2VecTensors.v1"
|
|
|
|
width = ${nlp.pipeline.tok2vec.model:width}
|
|
|
|
|
|
|
|
[nlp.pipeline.ner.model]
|
|
|
|
@architectures = "spacy.TransitionBasedParser.v1"
|
|
|
|
nr_feature_tokens = 3
|
|
|
|
hidden_width = 128
|
2020-06-26 20:34:12 +03:00
|
|
|
maxout_pieces = 2
|
|
|
|
use_upper = true
|
2020-05-30 21:27:47 +03:00
|
|
|
|
|
|
|
[nlp.pipeline.ner.model.tok2vec]
|
|
|
|
@architectures = "spacy.Tok2VecTensors.v1"
|
|
|
|
width = ${nlp.pipeline.tok2vec.model:width}
|
|
|
|
|
|
|
|
[nlp.pipeline.tok2vec.model]
|
|
|
|
@architectures = "spacy.HashEmbedCNN.v1"
|
|
|
|
pretrained_vectors = ${nlp:vectors}
|
2020-06-26 20:34:12 +03:00
|
|
|
width = 128
|
|
|
|
depth = 4
|
2020-05-30 21:27:47 +03:00
|
|
|
window_size = 1
|
2020-06-26 20:34:12 +03:00
|
|
|
embed_size = 7000
|
2020-05-30 21:27:47 +03:00
|
|
|
maxout_pieces = 3
|
|
|
|
subword_features = true
|
2020-06-26 20:34:12 +03:00
|
|
|
dropout = ${training:dropout}
|