Skip to content
New issue

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

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

Already on GitHub? # to your account

update decoder_vocab_size when resizing embeds #16700

Merged
merged 1 commit into from
Apr 11, 2022

Conversation

patil-suraj
Copy link
Contributor

What does this PR do?

  • Update the config.decoder_vocab_size when resizing embeds if the enc, dec embeds are shared.
  • Use config.decoder_vocab_size to reshape the lm_logits

Fixes #16670

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Apr 11, 2022

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

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing!

@patil-suraj patil-suraj merged commit 1471857 into huggingface:main Apr 11, 2022
@patil-suraj patil-suraj deleted the fix-marian-resize branch April 11, 2022 16:02
elusenji pushed a commit to elusenji/transformers that referenced this pull request Jun 12, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug in Marian model (or tokenizer) in transformers==4.18.0
3 participants