You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you call SentenceTransformer.encode() it moves self (Module) to device which by default is None (Line #153 of SentenceTransformer.py). I don't know if it is desired behavior, but I was a bit confused. Imagine such scenario:
model = SentenceTransformer() # I know that I can give device here, while init, but I do not want to
model.to('cuda:1')
model.encode('some text') # it will be encoded on cuda:0 if you have 2 GPUs
The text was updated successfully, but these errors were encountered:
When you call SentenceTransformer.encode() it moves self (Module) to device which by default is None (Line #153 of SentenceTransformer.py). I don't know if it is desired behavior, but I was a bit confused. Imagine such scenario:
model = SentenceTransformer() # I know that I can give device here, while init, but I do not want to
model.to('cuda:1')
model.encode('some text') # it will be encoded on cuda:0 if you have 2 GPUs
The text was updated successfully, but these errors were encountered: