sagorbrur / bnlp

BNLP is a natural language processing toolkit for Bengali Language.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Help regarding CUDA

Codernob opened this issue · comments

I am using the bnwiki doc2vec model. It computes embeddings using CPU. It is taking too much time to compute the document embeddings. How can I make it run on my CUDA enabled GPU?

Hi @Codernob
As per my knowledge and according to this issue, Gensim has no GPU implementation. So far bnwiki doc2vec model is based on CPU.
But there might be some alternative third-party tool you check, although I am not sure about it.
You should check the Gensim issue, you might get some overview and tools.

I am using the bnwiki doc2vec model. It computes embeddings using CPU. It is taking too much time to compute the document embeddings. How can I make it run on my CUDA enabled GPU?

Hi @Codernob ,
I have found the problem. Because we are loading the model every time it takes time for loading.
I have refactored the code. I will publish soon. Now while initializing the BengaliDoc2vec class you can pass the model and it will load once.
then you can create an instance and call the load model every time you want to generate a document vector.
Hope this might help you.
Thanks for the issue.

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.