nanoGPT
nanoGPT copied to clipboard
how to train on M1 ?
I am trying to run train.py on my MBP M1 but it throws error as following:
ctx = nullcontext() if device_type == 'cpu' else torch.amp.autocast(device_type=device_type, dtype=ptdtype)
AttributeError: module 'torch' has no attribute 'amp'
Any idea? thanks,