Skip to content

add a suggestion since code snippet has been repeated. #211

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

Closed
wants to merge 1 commit into from

Conversation

Shuyib
Copy link
Contributor

@Shuyib Shuyib commented Jun 15, 2024

I noticed there's a code cell that has been repeated. I suggest maybe to rename the variable to token_ids_ind (token ids individual) maybe to show how to subset the tensor. Just for illustrative purposes. Based on the previous explanation. Thank you.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@rasbt rasbt mentioned this pull request Jun 15, 2024
@rasbt
Copy link
Owner

rasbt commented Jun 15, 2024

Thanks for the note! I addressed it in #212 . I like your suggestion, but checking with the book, I see that I annotated it as

Token IDs:
 tensor([[[16657], # First batch
         [  339],
         [42826]],
        [[49906], # Second batch
         [29669],
         [41751]]])

which should probably help making it clear.

@rasbt rasbt closed this Jun 15, 2024
@Shuyib
Copy link
Contributor Author

Shuyib commented Jun 15, 2024

That works better 👍🏿 . Apologies for the commit to the main branch.

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