llama-cpp-python

Python bindings for llama.cpp with OpenAI-compatible API server.

Open SourceSelf HostedOffline Capable
0.0 (0)

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

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 SourceSelf HostedOffline
Advanced
0.0 (0)

Open-source ChatGPT alternative that runs 100% offline on your computer.

Open SourceSelf HostedOffline
Beginner
0.0 (0)
Featured

Port of Meta's LLaMA model in C/C++ for efficient CPU inference

Open SourceSelf HostedOffline
Intermediate
0.0 (0)

Fast LLM inference on consumer GPUs using neuron-aware sparse computation.

Open SourceSelf HostedOfflineGPU 4GB+
Advanced
0.0 (0)
Featured

High-throughput LLM serving engine with PagedAttention

Open SourceSelf HostedOfflineGPU 16GB+
Intermediate
0.0 (0)

Minimalist machine learning framework for Rust focused on performance and serverless inference.

Open SourceSelf HostedOffline
Intermediate
0.0 (0)
Browse all LLM Inference & Serving tools