Skip to content

Freezing some transformer layers during training? #6849

Description

@jricheimer

Hello. I'm using spacy-nightly to train textcat with transformer.

In previous experiments on our dataset using hugging-face transformers, freezing a subset of the pretrained transformer's layers during training increased performance significantly. Is there a way to do this in spacy 3? I can only find in the documentation how to freeze the whole transformer component, but not how to freeze parts of it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feat / transformerFeature: Transformer🌙 nightlyDiscussion and contributions related to nightly builds

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions