rasbt / LLMs-from-scratch

Implement a ChatGPT-like LLM in PyTorch from scratch, step by step
https://www.amazon.com/Build-Large-Language-Model-Scratch/dp/1633437167
Other
34.13k stars 4.18k forks source link

Add missing device transfer in optional gpt_generate.py code #436

Closed rasbt closed 2 weeks ago

rasbt commented 2 weeks ago

Adds a missing .to(device) in optional gpt_generate.py code

Fixes #435