gemma-cpp-python: Python Bindings for gemma.cpp
Latest Version: v0.1.2
- Support Completion function
- Fix the MacOS pip install
gemma-cpp-python
provides Python bindings for gemma
, a high-performance C++ library, bridging advanced computational functionalities to Python.
Special thanks to the creators and contributors of gemma.cpp for their foundational work.
Prerequisites
: Ensure Python 3.8+ and pip are installed.
For a quick setup, install directly from PyPI:
pip install pygemma==0.1.2
To install the latest version or for development purposes:
- Clone the repo and enter the directory:
git clone https://github.com/namtranase/gemma-cpp-python.git
cd gemma-cpp-python
- Install Python dependencies and pygemma:
pip install -r requirements.txt && pip install .
To acctually run the model, you need to install the model followed on the gemma.cpp repo
For usage examples, refer to tests/test_chat.py. Here's a quick start:
import pygemma
pygemma.show_help()
Contributions are welcome. Please clone the repository, push your changes to a new branch, and submit a pull request.
gemma-cpp-python is MIT licensed. See the LICENSE file for details.