llama-cpp-python
Python bindings for llama.cpp with OpenAI-compatible API server.
About
Python bindings for Georgi Gerganov's llama.cpp turn that C++ inference library into something installable with pip and usable from ordinary Python code. llama-cpp-python exposes three layers: low-level ctypes bindings to the C API, a high-level interface for text and chat completion, and an OpenAI-compatible web server that works as a drop-in replacement for hosted APIs. It supports function and tool calling in the OpenAI format, multimodal input through models such as LLaVA and Moondream, JSON schema constrained output, speculative decoding with draft models, and embedding generation. Builds compile llama.cpp from source, with CMake flags enabling CUDA, Metal, ROCm, Vulkan, SYCL, or OpenBLAS backends, and models can be pulled directly from the Hugging Face Hub. The library integrates with LangChain and LlamaIndex and is released under the MIT license, making it a common foundation for local assistants and privacy-sensitive deployments.
Reviews (0)
Leave a Review
No reviews yet. Be the first to review!
Details
- Category
- LLM Inference & Serving
- Price
- Free
- Platform
- Local/Desktop
- Difficulty
- Easy (2/5)
- License
- MIT
- Added
- Apr 3, 2026
Related Tools
Minimalist ML framework in Rust by Hugging Face for fast inference.
Open-source ChatGPT alternative that runs 100% offline on your computer.
Port of Meta's LLaMA model in C/C++ for efficient CPU inference
Fast LLM inference on consumer GPUs using neuron-aware sparse computation.
High-throughput LLM serving engine with PagedAttention
Minimalist machine learning framework for Rust focused on performance and serverless inference.