question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mac M1 GPU support

See original GitHub issue

Hi,

I am wondering if there is a way to send the model to mps GPU (mac apple M1)

Something like:

device = torch.device("mps")

model = SetFitModel.from_pretrained("sentence-transformers/paraphrase-mpnet-base-v2")

model.to(device)
....

in order to exploit the GPU since so far it uses only CPU.

Many thanks in advance for your help

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lewtuncommented, Nov 24, 2022

@nishanthcmesh I think you can try the approach @dpicca took here by editing the source of sentence-transformers to put the model on mps if it’s also available. If that works, my suggestion would be to open a PR on that repo once the next version of torch is released

0reactions
nishanthcmeshcommented, Nov 23, 2022

cumsum:out now works with the nightly version of PyTorch for MPS. Could you give me a bit of guidance or a reference .to() function that I can use to submit a pull request for this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use an external graphics processor with your Mac
eGPUs are supported by any Mac with an Intel processor and Thunderbolt 3 ports running macOS High Sierra 10.13.4 or later. Learn how...
Read more >
Running PyTorch on the M1 GPU - Sebastian Raschka
Today, PyTorch officially introduced GPU support for Apple's ARM M1 chips. This is an exciting day for Mac users out there, so I...
Read more >
GPU-Acceleration Comes to PyTorch on M1 Macs
PyTorch have released support for GPU-acceleration on M1 Macs. Here we will explain how to get started with the new MPS layer for...
Read more >
Install TensorFlow on Mac M1/M2 with GPU support
Install TensorFlow in a few steps on Mac M1/M2 with GPU support and benefit from the native performance of the new Mac ARM64...
Read more >
Will M1 Macs Support eGPUs? (And Why They Probably ...
M1 Macs have Thunderbolt 3 connections which can be connected to an eGPU PCIe (Peripheral Component Interconnect Express) that are used on all...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found