Skip to content
Discussion options

You must be logged in to vote

You're just missing the initialize step that actually loads the transformer model based on the config:

nlp = spacy.blank("en")
trf = nlp.add_pipe("transformer", config=DEFAULT_CONFIG["transformer"])
nlp.initialize()

To be honest, most of the tokenizer and transformer config settings should actually have been placed in [initialize] rather than [components], but we released the first versions of transformer with this in [components] and it would be confusing for users if it changed now.

Related docs on the initialization step: https://spacy.io/usage/training#initialization

Replies: 2 comments 1 reply

Comment options

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

Answer selected by adrianeboyd
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat / transformer Feature: Transformer
3 participants
Converted from issue

This discussion was converted from issue #10607 on April 04, 2022 06:21.