Skip to content

Move misplaced line#29117

Merged
ArthurZucker merged 1 commit into
huggingface:mainfrom
kno10:patch-1
Feb 20, 2024
Merged

Move misplaced line#29117
ArthurZucker merged 1 commit into
huggingface:mainfrom
kno10:patch-1

Conversation

@kno10

@kno10 kno10 commented Feb 19, 2024

Copy link
Copy Markdown
Contributor

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

@younesbelkada younesbelkada left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

Copy link
Copy Markdown

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