Reputation: 61
I want to train spacy model on custom dataset but its take too much time for training, is there any way to speed up the training. I passed device=0 in ner.begin_training() but it takes same amount of time as before.
Upvotes: 5
Views: 3115
Reputation: 4319
Yes, it is possible.
[EDIT]
-> [Notebook settings]
-> Select GPU under Hardware Acceleration
(It restarts the runtime, so all your cell states get lost)!pip install -U spacy[cuda100]
to install spacy with Cuda SupportScript:
import spacy
gpu = spacy.prefer_gpu()
print('GPU:', gpu)
It returns:
GPU: True
Upvotes: 4