setfit
setfit copied to clipboard
How to take advantage of Mac M1 GPUs?
More than an issue, this is a request for help.
Do you have advice on how to take advantage of the Mac M1 Pro GPU for training a model, assuming the underlying Torch implementation provides support?
There are some tutorials on how to use Torch with the MPS driver, but I'm not sure how to signal SetFit to use a specific GPU.
Hi @secastro as far as I know, sentence-transformers
doesn't support the mps
device needed to train / run inference
(see this issue). If support becomes available, we can certainly add it to setfit
!
Any updates on this? What's needed to integrate support for mps
? I'm happy to help as needed.
@secastro @zachschillaci27 https://github.com/UKPLab/sentence-transformers/issues/1736 solves it
MPS is supported by sentence-transformers since https://github.com/UKPLab/sentence-transformers/pull/2342
Indeed! As of Sentence Transformers v2.3.0 it should now automatically select MPS as the default device if relevant.
pip install -U sentence_transformers
- Tom Aarsen