You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe the last line in the script should read model.load_state_dict(torch.load("model.pth", weights_only=True))
With weights_only as a parameter of torch.load(), not model.load_state_dict()
The text was updated successfully, but these errors were encountered:
Thanks for pointing that out. I added the weights_only=True recently everywhere so it doesn't raise an unnecessary PyTorch warning and must have misplaced it in this particular case. It should also not be necessary anymore since I think in newer PyTorch versions weights_only=True is not the default. I will fix that in the coming days. Thanks for reporting!
https://github.com/rasbt/LLMs-from-scratch/blob/bb31de89993441224e9005926dedad95395bb058/ch05/01_main-chapter-code/gpt_train.py#L242C4-L242C70
I believe the last line in the script should read
model.load_state_dict(torch.load("model.pth", weights_only=True))
With weights_only as a parameter of torch.load(), not model.load_state_dict()
The text was updated successfully, but these errors were encountered: