minor change to avoid confusion in ch2-5#310
Merged
Merged
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
lewtun
approved these changes
Sep 13, 2022
lewtun
left a comment
Member
There was a problem hiding this comment.
Thanks for this tweak @daspartho and welcome to the 🤗 community!
I've left a small suggestion and then we can merge this!
| Oh no! Why did this fail? "We followed the steps from the pipeline in section 2. | ||
|
|
||
| The problem is that we sent a single sequence to the model, whereas 🤗 Transformers models expect multiple sentences by default. Here we tried to do everything the tokenizer did behind the scenes when we applied it to a `sequence`, but if you look closely, you'll see that it didn't just convert the list of input IDs into a tensor, it added a dimension on top of it: | ||
| The problem is that we sent a single sequence to the model, whereas 🤗 Transformers models expect multiple sentences by default. Here we tried to do everything the tokenizer did behind the scenes when we applied it to a `sequence`, but if you look closely, you'll see that the tokenizer didn't just convert the list of input IDs into a tensor, it added a dimension on top of it: |
Member
There was a problem hiding this comment.
I think we can use this as an opportunity to split the long sentence :)
Suggested change
| The problem is that we sent a single sequence to the model, whereas 🤗 Transformers models expect multiple sentences by default. Here we tried to do everything the tokenizer did behind the scenes when we applied it to a `sequence`, but if you look closely, you'll see that the tokenizer didn't just convert the list of input IDs into a tensor, it added a dimension on top of it: | |
| The problem is that we sent a single sequence to the model, whereas 🤗 Transformers models expect multiple sentences by default. Here we tried to do everything the tokenizer did behind the scenes when we applied it to a `sequence`. But if you look closely, you'll see that the tokenizer didn't just convert the list of input IDs into a tensor, it added a dimension on top of it: |
Contributor
Author
|
@lewtun I've made the suggested changes :) |
Member
|
Thanks for iterating! |
GITbaburin
pushed a commit
to GITbaburin/course
that referenced
this pull request
May 17, 2026
* minor change to avoid confusion * added suggestion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
very small PR
Change
Replaced "it" with "the tokenizer" on one line in ch2-5
Motivation
I was going through the course (which is fantastic by the way), and I was a little confused by this one line; perhaps it's just me, but I think it's better to replace "it" with the exact thing here to avoid confusion.