I have trained paragraph vectors for around 2300 paragraphs(between 2000-12000 words each) each with vector size of 300. Now, I need to infer paragraph vectors of around 100,000 sentences which I have considered as paragraphs(each sentence is around 10-30 words each corresponding to the earlier 2300 paragraphs already trained).
So, am using
model.infer_vector(sentence)
But, the problem is it is taking too long, and it does not take any arguments such as "workers
" .! Is there a way I can speed up the process by threading or some other way? I am using a machine with 8gb ram and when I checked the available cores using
cores = multiprocessing.cpu_count()
it comes out to be 8.
I need this for answering multiple choice questions. Also, are there any other libraries/models such as doc2vec
which can help in this task?
Thanks in advance for your time.