Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cuda device instead of use_gpu=True when multiple GPUs are available #84

Open
mrgransky opened this issue Apr 8, 2024 · 0 comments
Open

Comments

@mrgransky
Copy link

Given the multilingual pipeline:

import trankit
from trankit import Pipeline
lemmatizer_multi_lingual_pipeline = Pipeline(
			lang='finnish-ftb',
			gpu=True, # <<<<============== using device="cuda:0" ? instead? ==============>>>>
			embedding='xlm-roberta-large', 
			cache_dir='/path/2/cache_dir',
		)
lemmatizer_multi_lingual_pipeline.add('english')
lemmatizer_multi_lingual_pipeline.add('swedish')
lemmatizer_multi_lingual_pipeline.add('danish')
lemmatizer_multi_lingual_pipeline.add('russian')
lemmatizer_multi_lingual_pipeline.add('french')
lemmatizer_multi_lingual_pipeline.add('german')
lemmatizer_multi_lingual_pipeline.set_auto(True)

Instead of gpu=True, Is it possible to specify device="cuda:0" or device="cuda:2" when multiple GPUs are available in a machine?

Cheers,

@mrgransky mrgransky changed the title specify cuda device instead of use_gpu=True when multiple gpus are available Cuda device instead of use_gpu=True when multiple GPUs are available Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant