-
Notifications
You must be signed in to change notification settings - Fork 4
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
Implemented XLMRoberta
sub-tasks
#5
Conversation
Sweet! |
Can you run install and run pre-commit on your files |
if labels is not None: | ||
# move labels to correct device to enable model parallelism | ||
labels = labels.to(logits.device) | ||
loss_fct = nn.losses.cross_entropy() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nn.losses.cross_entropy
is a function so it should be loss_fct = nn.losses.cross_entropy
else: | ||
loss = loss_fct(logits, labels) | ||
elif self.config.problem_type == "single_label_classification": | ||
loss_fct = nn.losses.cross_entropy() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
Used autopep8 before now, would use pre-commit now |
Ready to be Merged |
Proposed changes
Implemented
XLMRobertaForSequenceClassification
,XLMRobertaForTokenClassification
and XLMRobertaForQuestionAnswering and provided their corresponding tests. All tests passed.Types of changes
What types of changes does your code introduce?
Put an
x
in the boxes that apply