Takes way too long to train an NLP model on my local computer

I am training the model in chatper 10 of the book. However, I noticed something unusual when running the code:

  • I’m using a windows 11 PC and have CUDA 12.7 installed. The GPU I’m using is nvidia’s RTX 3060. torch.cuda.is_available() returns True.
  • Loading the text files takes an unusally long time, about 3mins.
  • Creating the Learner takes about 38mins.

Does it have something to do with the windows platform? Because it shows a warning somewhere that prompts multiprocessing is disabled due to limits in Ipython and windows.

I figured out why creating the learner was so slow.
Because it needed to download a model from the internet, and the network then happened to be very slow.