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

MPS (Apple Silicon) Support #11

Open
dsanmart opened this issue Feb 23, 2024 · 2 comments
Open

MPS (Apple Silicon) Support #11

dsanmart opened this issue Feb 23, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@dsanmart
Copy link

Will there be MPS support for the Gemma models? It would enable access to a larger community.

@lamroger
Copy link

lamroger commented Feb 29, 2024

Took a look, a few things.

Linux / mps support looks to be in progress still pytorch/pytorch#81224 so running in a container isn't ready yet.

MPS has some limitations around complex tensors atm. Since gemma uses RoPE, it uses complex tensors and errors out if you run it locally.

https://github.com/pytorch/pytorch/pull/116764/files#diff-fe061f10677283971d77576718d3a04a00b2225d72c043fd59222a882b92c64bR654

freqs_cis = self.freqs_cis.index_select(0, input_positions)

Running locally with python scripts/run.py --ckpt gemma-2b-it.ckpt --variant 2b --device mps

@bghira
Copy link

bghira commented Apr 4, 2024

pytorch 2.3 has bf16 and complex tensor support, and dockerised containers now work @lamroger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants