LLMs-from-scratch
LLMs-from-scratch copied to clipboard
Update ch04.ipynb
Add missing import.
Thanks for the PR, I appreciate it! However, I think in this notebook importing torch is not necessary as we are working with import torch.nn as nn. Did you bump into any import issues?
torch.arange is used in calculating position embeddings.
Ah yes good call. I see that I imported it here:
Thanks again for moving the import torch line up. I just removed the 2nd import to reduce redundancy.