8000 Initial support for Metal Performance Shaders (MPS) by dameikle · Pull Request #98 · eole-nlp/eole · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Initial support for Metal Performance Shaders (MPS) #98

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

Merged
merged 6 commits into from
Oct 2, 2024

Conversation

dameikle
Copy link
Contributor
@dameikle dameikle commented Sep 7, 2024

Makes adjustments to provide initial support for Apple Silicon Metal Performance Shaders (MPS) to provide a base for further optimisation.

This has been tested on basic training and inference on both M1 and M3 Macs. It has also been used for inference of larger production grade models that have been trained on CUDA.

output

@francoishernandez
Copy link
Member

Thanks a lot @dameikle ! Quite curious to see what we can achieve on Apple silicon chips.
I'll try and test this some time this week.

@francoishernandez francoishernandez added the enhancement New feature or request label Sep 16, 2024
@francoishernandez
Copy link
Member

@dameikle, I managed to run this fine on an M3 Macbook Air 👌

A few questions:

  1. What kind of environment do you use on your mac(s)? I had a few issues setting things up (especially with some requirements not liking python3.12, had to setup python3.10.) If you have any tips to make things easier for other users, it might be good to create a new entry somewhere in the docs (e.g. in the FAQ sections).
  2. Did you have to make some adaptations to the recipe(s) you tested? Seems like some of the bash commands are not all supported on default macOS (or my shell is wonky, possible).
  3. You mention "inference of larger production grade models". Could you provide some details on this? E.g. a minimal benchmark of model size / performance (speed, memory, etc.) would very useful information, especially if we plan on "further optimisation"!

@dameikle
Copy link
Contributor Author
dameikle commented Sep 23, 2024

Thanks for taking a look @francoishernandez.

What kind of environment do you use on your mac(s)? I had a few issues setting things up (especially with some requirements not liking python3.12, had to setup python3.10.) If you have any tips to make things easier for other users, it might be good to create a new entry somewhere in the docs (e.g. in the FAQ sections).

I normally use Virtual Envs created from Homebrew installed Python to avoid clashes with the macOS installed version. I can put together some documentation.

Did you have to make some adaptations to the recipe(s) you tested? Seems like some of the bash commands are not all supported on default macOS (or my shell is wonky, possible).

I was mainly doing things by hand as well as using others models I'd trained elsewhere, so wasn't trying them out to be honest. Can have a wee look at them and see if we can make them work across both.

You mention "inference of larger production grade models". Could you provide some details on this? E.g. a minimal benchmark of model size / performance (speed, memory, etc.) would very useful information, especially if we plan on "further optimisation"!

Sounds like a plan. Will pull information together.

@francoishernandez
Copy link
Member

Thanks for the updates @dameikle!
Can we merge or do you have pending topics to be pushed?
(Docs can be updated separately when you'll find time to put it together.)

@dameikle
Copy link
Contributor Author

@francoishernandez - I think it's good to merge now. I was starting to work on the docs and taking a look at the recipies last night but like you say, can do that in seperate PR.

@francoishernandez francoishernandez merged commit a8cfb0d into eole-nlp:main Oct 2, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

3 participants
0