Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SerializedEmbedding: override default freeze=True on deserialization #304

Merged
merged 3 commits into from
Mar 31, 2023

Conversation

kundaMwiza
Copy link
Contributor

@kundaMwiza kundaMwiza commented Mar 31, 2023

What does this PR do?

The default behaviour of nn.Embedding.from_pretrained is to freeze the constructed embedding weights. This may not be what the user intends to do. This PR overrides the default value and allows the user to optionally change the behaviour (for example in pipelined_model_cls.deparallelize())

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

…deserializing the SerializedEmbedding module
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Mar 31, 2023

The documentation is not available anymore as the PR was closed or merged.

@kundaMwiza kundaMwiza requested a review from jimypbr March 31, 2023 14:58
@jimypbr jimypbr merged commit 769986b into huggingface:main Mar 31, 2023
@jimypbr jimypbr deleted the serialized-embedding-fix branch March 31, 2023 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants