🦙 Python Bindings for llama.cpp
Simple Python bindings for @ggerganov's llama.cpp
library.
This package provides:
- Low-level access to C API via
ctypes
interface. - High-level Python API for text completion
- OpenAI-like API
- LangChain compatibility
Documentation is available at https://llama-cpp-python.readthedocs.io/en/latest.
Warning
Starting with version 0.1.79 the model format has changed from ggmlv3
to gguf
. Old model files can be converted using the convert-llama-ggmlv3-to-gguf.py
script in llama.cpp
Install from PyPI (requires a c compiler):
pip install llama-cpp-python