Skip to content
Discussion options

You must be logged in to vote

This requires a newer version of the architecture spacy-transformers.TransformerModel.v3: https://spacy.io/api/architectures#TransformerModel

The output will be in trf_data.model_output once the setting is correct.

To modify en_core_web_trf, you need to modify the transformer model loaded within the pipeline component directly rather than modifying the config:

nlp.get_pipe("transformer").model.transformer.config.output_attentions = True

This modified setting will be saved with nlp.to_disk as part of the model data for transformer. It's a bit confusing, but the original settings from config.cfg are only really used when the model is initialized. (If I were starting from scratch, I'd move …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@calebjacksonhoward
Comment options

@calebjacksonhoward
Comment options

Answer selected by calebjacksonhoward
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat / transformer Feature: Transformer
2 participants