MilaNLProc / contextualized-topic-models

A python package to run contextualized topic modeling. CTMs combine contextualized embeddings (e.g., BERT) with topic models to get coherent topics. Published at EACL and ACL 2021 (Bianchi et al.).
MIT License
1.2k stars 145 forks source link

Question regarding GPU usage #112

Closed sersoage closed 2 years ago

sersoage commented 2 years ago

Can a GPU number be specified when fiting the model, if yes how? Thanks

vinid commented 2 years ago

Hello!

You can select a specific GPU with



import os

os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"   
os.environ["CUDA_VISIBLE_DEVICES"]=GPU_NUMBER```
sersoage commented 2 years ago

thanks!