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

Fix training mode outputs for roberta and distilbert mlm models #254

Merged
merged 1 commit into from
Jan 26, 2023

Conversation

jimypbr
Copy link
Contributor

@jimypbr jimypbr commented Jan 26, 2023

What does this PR do?

  • In training mode for MLM models we don't want to return the logits for performance.
  • Distilbert and Roberta were only checking for if labels is None, but this meant that in evaluation the training path was being taken. Fix this by checking instead for if self.training.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jan 26, 2023

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

@jimypbr jimypbr merged commit 7f7bf75 into main Jan 26, 2023
@jimypbr jimypbr deleted the mlm-training-fix branch May 24, 2023 15:49
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.

2 participants