-
Notifications
You must be signed in to change notification settings - Fork 34
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
Update README with OpenBlas support #105
base: main
Are you sure you want to change the base?
Conversation
Thanks @paolorechia for taking the time to test the package on the other backends. |
Oh, thanks for letting me know, that’s useful. I was testing with my own code. Will run the test suite when I get the chance. I was able to compile with both OpenBLAS and OpenVINO flags but it doesn’t seem like the pybindings load the OpenVINO model automatically like the original whisper-cpp does - or I did something wrong. Any ideas if your library supports OpenVINO? |
I haven't tested the library with OpenVINO, but if the compilation was successful then it'll probably work. |
@absadiki you're absolutely right, I was able to convert a model and load it with whisper-cpp cli and whisper-server. So maybe if I just copy the converted model to the right path the |
Unfortunately, I don't think it's picking up the OpenVINO model automatically:
Where running the CLI loads it instead:
|
@paolorechia, I've checked the model = Model(model_path, use_openvino=True) # this will work similarly to the whisper-cli Let me know if you find any issues ? |
@absadiki wow, thank you so much for looking into this, I’ll give it a try this weekend when I get some time and will let you know |
You are welcome :) |
@absadiki testing...
It transcribes but logs an error on initializing the encoder:
|
Seems like it's trying to load the model from the wrong path. Tried also with a bit cleaner code snippet
|
@absadiki Actually hold on, I recall I had to manually convert the models, let me copying those to pywhispercpp folder |
No, no luck. I tried copying
But I still get the same error. Unfortunately I don't know enough to debug this further. |
I think I'll drop making this work with OpenVINO for now and just stick to OpenBlas, it's good enough for my use case. |
What errors are you encountering after placing all the models in the same folder? I think you were almost there. I thought the instructions in the whisper.cpp README were clear enough, but here is a step-by-step guide on how to make it work, at least how it worked on my end:
model = Model('path/to/ggml.bin', use_openvino=True, openvino_model_path='path/to/xml')
BTW, if you don't need to convert the models yourself, you can find some pre-converted models in the intel HF repo Let me know if you need any further help! |
|
As far as I can trace, it crashes inside whisper.cpp inside this file
Somewhere inside this code, as the logged exception matches the string in the caught exception below:
And this is likely the logged error
This doesn't make any sense to me, as the file exists and it worked with the original whisper.cpp. I also tried downloading the some files from the HF link you sent me, but it still doesn't work. It seems something is wrong either with my python environment (I'm using |
There's also a Which just confirms it's unable to read the model |
Anyways, my hunch is something is wrong with my installed OpenVINO environment that is linked to I guess if OpenVINO worked for you we can close this issue, I won't be investing much more time now. |
This should work and provide some speedup depending on your CPU (tested compiling on original whisper.cpp repo: https://github.com/ggerganov/whisper.cpp?tab=readme-ov-file#blas-cpu-support-via-openblas)
Package installs without any issues.
TODO: test bindings work fine.