nanoGPT icon indicating copy to clipboard operation
nanoGPT copied to clipboard

how to train on M1 ?

Open yangboz opened this issue 1 year ago • 14 comments

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,

yangboz avatar Feb 15 '23 02:02 yangboz