-
Notifications
You must be signed in to change notification settings - Fork 23
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
"ggml-metal.metal" file couldn't be found when loading the large-v3 model for CoreML #35
Comments
Hello @Gdesau, According to this I think you need to export the folder where the export GGML_METAL_PATH_RESOURCES=/Users/gregoiredesauvage/Dev/Modules/pywhispercpp/whisper.cpp If it didn't work, maybe you can try the following as well: GGML_METAL_PATH_RESOURCES=/Users/gregoiredesauvage/Dev/Modules/pywhispercpp/whisper.cpp python /path/to/your/script.py |
Hello @abdeladim-s, Thank you very much for your help. Unfortunately the first solution couldn't fix my issue and I couldn't try the second one because I'm working in a notebook. But I'm thinking that maybe the issue may come from these 2 lines in the result:
These are located just after this line:
I've tried to search about the default.metallib and why it's not found but couldn't find something helpful. Do you have any idea? |
@Gdesau, I think using a notebook is part of the problem. ggml_metal_init: GGML_METAL_PATH_RESOURCES = nil What I can suggest:
|
@abdeladim-s, thanks a lot, setting the env variable with
Do you think that there are other env variables to set? I've checked the "ggml-metal.metal" file it didn't seem to be but maybe I missed something |
@abdeladim-s, Thanks a lot! I followed the #2041, and hardcoded the path to the "ggml-common.h" file into the "ggml-metal.metal" file and it worked! So the 3 first lines of "ggml-metal.metal" file were as follows:
And I changed 3rd line with:
Now the Core ML model is loaded successfully in my notebook. So, to summarize, the full solution is to:
|
`Glad it finally worked! |
Hello everyone,
I'm working with an M3 Max and I've tried to load the "ggml-large-v3.bin" model with the following code:
But it's unable to find the ggml-metal.metal file when it is actually present in the whisper.cpp folder. It gives me the following result:
I've tried to add the path to the environment variables with:
but it didn't work.
I have the "ggml-large-v3-encoder.mlmodelc" file in the same folder as the "ggml-large-v3.bin" file.
Any idea?
The text was updated successfully, but these errors were encountered: