Skip to content

Trainer a NER from scratch and reusing the parser, tagger, and other components from en_core_web_md model #9213

Discussion options

You must be logged in to vote

I believe I found the solution. They key was to freeze absolutely everything and to set the tok2vec source to en_core_web_md.

[components]

[components.tok2vec]
source = "en_core_web_md"

[components.tagger]
source = "en_core_web_md"

[components.parser]
source = "en_core_web_md"

[components.attribute_ruler]
source = "en_core_web_md"

[components.lemmatizer]
source = "en_core_web_md"

[components.ner]
source = "en_core_web_md"

[training]
seed = ${system.seed}
gpu_allocator = ${system.gpu_allocator}
dropout = 0.1
accumulate_gradient = 1
patience = 1600
max_epochs = 0
max_steps = 20000
eval_frequency = 200
frozen_components = ["tok2vec", "tagger", "parser", "attribute_ruler", "lemmatizer"…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mbrunecky
Comment options

Answer selected by oliviercwa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
training Training and updating models feat / ner Feature: Named Entity Recognizer
2 participants