rasbt / LLMs-from-scratch

Implementing a ChatGPT-like LLM in PyTorch from scratch, step by step
https://www.manning.com/books/build-a-large-language-model-from-scratch
Other
27.86k stars 3.16k forks source link

Duplicated code cell (Exercise 5.3: Deterministic behavior in the decoding functions) #328

Closed labdmitriy closed 1 month ago

labdmitriy commented 1 month ago

Bug description

Hi @rasbt,

Perhaps it was done intentionally but in this notebook there are cells 8 and 9 which are exactly equal (# Deterministic behavior: No top_k, no temperature scaling): https://github.com/rasbt/LLMs-from-scratch/blob/main/ch05/01_main-chapter-code/exercise-solutions.ipynb

Thank you.

What operating system are you using?

None

Where do you run your code?

None

Environment

rasbt commented 1 month ago

Thanks for the note. This was actually intentional, but I can see how this is confusing. I added a note about that.