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

Implemented XLMRoberta sub-tasks #5

Merged
merged 7 commits into from
Apr 24, 2024

Conversation

Seun-Ajayi
Copy link
Contributor

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

  • New Model Architecture
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

@ToluClassics
Copy link
Owner

Sweet!

@ToluClassics
Copy link
Owner

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()
Copy link
Owner

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()
Copy link
Owner

Choose a reason for hiding this comment

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

same

@Seun-Ajayi
Copy link
Contributor Author

Can you run install and run pre-commit on your files

Used autopep8 before now, would use pre-commit now

@Seun-Ajayi
Copy link
Contributor Author

Seun-Ajayi commented Apr 24, 2024

Ready to be Merged

@ToluClassics ToluClassics merged commit 73661bc into ToluClassics:main Apr 24, 2024
2 checks passed
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