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

Move misplaced line #29117

Merged
merged 1 commit into from
Feb 20, 2024
Merged

Move misplaced line #29117

merged 1 commit into from
Feb 20, 2024

Conversation

kno10
Copy link
Contributor

@kno10 kno10 commented Feb 19, 2024

Move misplaced line, improve code comment.

No functional change, the loss_fct is not used earlier and did not match the code comment either.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).

Who can review?

@ArthurZucker and @younesbelkada

Move misplaced line, improve code comment
Copy link
Contributor

@younesbelkada younesbelkada left a comment

Choose a reason for hiding this comment

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

Thanks so much for the nit !

shift_logits = shift_logits.view(-1, self.config.vocab_size)
shift_labels = shift_labels.view(-1)
# Enable model parallelism
# Ensure tensors are on the same device
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Ensure tensors are on the same device
# Ensure that tensors are on the same device

@ArthurZucker ArthurZucker merged commit a7ff2f2 into huggingface:main Feb 20, 2024
18 checks passed
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

itazap pushed a commit that referenced this pull request May 14, 2024
Move misplaced line, improve code comment
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.

4 participants