asahi417 / lm-question-generation

Multilingual/multidomain question generation datasets, models, and python library for question generation.
https://www.autoqg.net
MIT License
313 stars 30 forks source link

How to run on gpu? #9

Closed nikhilajoshy closed 1 year ago

nikhilajoshy commented 1 year ago

How to modify this line to run the model on GPU? model = TransformersQG('lmqg/t5-base-squad-qag')

asahi417 commented 1 year ago

Hi, it will be running on available gpus as a default. If you want to run it on a specific gpu, you need to specify it beforehand eg. export CUDA_VISIBLE_DEVICES=0.