-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
[Enhancement] Officially supported/provided python bindings #1156
Comments
+1 |
1 similar comment
+1 |
I would second there would be an official one. None of above really works out of box |
I looked at this a little more. I was hoping that there as a good tool for automatically generating Cython or pybind11 bindings, as maintenance of hand crafted bindings may be problematic. There are many tools ... I did not find anything that would work with llama cpp yet. Actually I was wondering if @saharNooby could comment with any lessons from rwkv.cpp. Or if others had any good experience with tools to generate python bindings for an existing library. |
Duplicate of #82, closing this as there's more discussion over there. |
@dmahurin Thanks for pinging me! I don't use any codegen tools in One lesson to share is: if you are distributing dll/so files, don't do breaking changes in C API, or else you would be spammed with "oops, I've updated the repo and nothing works!", because users would not rebuild/redownload the libraries. Not sure if it is applicable to |
@sw Ok, we can move the discussion to issue #82. Though the issue here is not currently part of the description (none) or discussion in that issue. The discussion for #82 seems to be mainly be about python bindings external to llama.cpp. This issue described here was specifically about having a directly supported python binding in the project (and also replacing the bash scripts with python). Python bindings, like rwkv.cpp has, like bert.cpp has. I think it is the right approach and adds the ability for llama.cpp to be directly integrated into the abundant python AI projects. |
Would the project accept a PR for providing directly supported python bindings.
I know the README mentions llama-cpp-python. And there are these and perhaps others...
pip install llama-cpp-python
pip install llamacpp
pip install pyllamacpp
pip install llamacpypy
Instead, perhaps it would be better to expose at least the low level interface as python directly in this repo.
Perhaps rwkv.cpp can be used as an example. It does the following:
The text was updated successfully, but these errors were encountered: