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

Fix minor printing issue and note inconsistency across platforms #563

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gsganden
Copy link

@gsganden gsganden commented Mar 11, 2025

This PR addresses two minor issues that might slightly confuse readers playing along at home:

  1. print_sampled_tokens() does not print tokens at the end of the vocabulary that are not sampled. In particular, it does not print "0 x you" currently. This PR adds minlength=len(probas) to the call to torch.bincount to address this issue.
  2. print_sampled_tokens() appears to give different results for me on Colab vs. MacOS, as happens with dropout in Ch. 3. This PR adds the same note as in ch. 3 to address that issue.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@gsganden gsganden marked this pull request as ready for review March 11, 2025 02:35
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.

1 participant