Skip to content

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
@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.

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