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

Apple Metal support #3

Closed
mldev94 opened this issue Jun 6, 2023 · 2 comments
Closed

Apple Metal support #3

mldev94 opened this issue Jun 6, 2023 · 2 comments

Comments

@mldev94
Copy link

mldev94 commented Jun 6, 2023

I believe adding the metal cpp files from "LLaMACpp" repository to src and some small changes on "extconf.rb" should be sufficient enough to build the native extension with metal support in case anyone runs sidekiq queues on mac devices to generate the responses 10x faster.

https://github.com/ggerganov/llama.cpp

I couldn't manage to build the gem even without changing the code. I always get "failed build native extensions" with .o files are not found error.

I will try to create a pull request if I can figure out why I get ".o" files are not found error.

Just wanted to bring it up if it's a 5-minute thing to add from your end since you created this gem. I can do my best to help with testing or wherever you need help with.

@yoshoku
Copy link
Owner

yoshoku commented Jun 14, 2023

@mldev94
I have released v0.2.0 with metal support. I do not know if it will be 10x faster, but please try it.
https://github.com/yoshoku/llama_cpp.rb/blob/main/CHANGELOG.md#020---2023-06-11

@mldev94
Copy link
Author

mldev94 commented Jun 16, 2023

Hi yoshuku, it works great. Thank you, it's not 10x but it's definitely 3x faster. It went down from 200-240 seconds of processing time for my long prompts to 40-75 seconds.

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

No branches or pull requests

2 participants