$npx skillfedfor your agent

llama-cpp-python

Python bindings for the llama.cpp library

With conditionsPyPI Artificial IntelligenceReleased Jul 2026732.9K downloads / moMITSource build

Decision gist · record as of 2026-08-14

sdist only — llama_cpp_python-0.3.34.tar.gz · builds from source
v0.3.34 · released 2026-07-12 · Python >=3.8 · 4 runtime deps: typing-extensions, numpy, diskcache, jinja2

Yes, with conditions. Install if you need local language model inference with hardware acceleration and can handle a non-trivial build process. The package is actively maintained, has no known vulnerabilities, and integrates well with popular frameworks. However, expect high install friction due to C compilation requirements—use pre-built wheels where available to reduce setup complexity. Not recommended if you need a quick, zero-configuration solution.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires a C compiler (gcc/clang on Linux, Visual Studio/MinGW on Windows, Xcode on macOS) and a compatible GGUF-format model file; build may fail without proper toolchain configuration.
  • Installation requires a C compiler and builds llama.cpp from source, which is computationally intensive and may fail without proper toolchain setup.
  • Pre-built wheels are available for multiple backends to reduce build friction.

License · maintenance · safety

MIT (permissive) — MIT license permits commercial use, modification, and distribution with minimal restrictions, making it suitable for proprietary projects.

last release 2026-07-12 (33 days) · last repo commit 2026-08-10 · 10,551 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 732,904 downloads/mo, #5,200 on PyPI

Verify before relying

pip install llama-cpp-python

from llama_cpp_python import Llama

llm = Llama(model_path="/path/to/model.gguf")
response = llm("Hello, how are you?")
  • Whether pre-built wheels significantly reduce installation time compared to source builds
  • Performance characteristics across different hardware backends (CPU vs CUDA vs Metal vs ROCm)
  • Memory requirements for running models of different sizes
  • Latency and throughput benchmarks for typical inference workloads
Same gist for agents: .md · .json

What it is and what it does

llama-cpp-python wraps the llama.cpp C library to bring efficient local language model inference to Python. It provides both a low-level ctypes interface to the C API and a high-level Python API that mimics OpenAI's completion endpoints, making it easy to integrate into existing workflows. The package supports multiple hardware acceleration backends including CUDA, Metal, ROCm, Vulkan, and CPU-only inference, with pre-built wheels available to avoid compilation overhead.

The library is designed for developers who want to run large language models on their own hardware without cloud dependencies. It includes an OpenAI-compatible web server for local API access, function calling support, vision model capabilities, and multi-model serving. Installation requires a C compiler and can be complex depending on your target hardware backend, but active maintenance and comprehensive documentation help mitigate setup friction.

Use it for

  • Run private language models locally without sending data to cloud APIs
  • Build OpenAI-compatible applications that work offline or on restricted networks
  • Integrate local inference into existing application frameworks for RAG or agent workflows
  • Deploy a local code completion server for development environments
  • Serve multiple models simultaneously via the built-in web server for multi-tenant inference
  • Accelerate inference on specific hardware (GPU, Apple Silicon) for production workloads

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, with conditions.

Install if you need local language model inference with hardware acceleration and can handle a non-trivial build process. The package is actively maintained, has no known vulnerabilities, and integrates well with popular frameworks. However, expect high install friction due to C compilation requirements—use pre-built wheels where available to reduce setup complexity. Not recommended if you need a quick, zero-configuration solution.

Install

llama-cpp-python on PyPI

Before you install

Installation requires a C compiler and builds llama.cpp from source, which is computationally intensive and may fail without proper toolchain setup. Pre-built wheels are available for multiple backends to reduce build friction. The package is actively maintained with recent releases.

Requires a C compiler (gcc/clang on Linux, Visual Studio/MinGW on Windows, Xcode on macOS) and a compatible GGUF-format model file; build may fail without proper toolchain configuration.

License in practice

MIT license permits commercial use, modification, and distribution with minimal restrictions, making it suitable for proprietary projects.

Quickstart

pip install llama-cpp-python

from llama_cpp_python import Llama

llm = Llama(model_path="/path/to/model.gguf")
response = llm("Hello, how are you?")

Verify before relying

  • Whether pre-built wheels significantly reduce installation time compared to source builds
  • Performance characteristics across different hardware backends (CPU vs CUDA vs Metal vs ROCm)
  • Memory requirements for running models of different sizes
  • Latency and throughput benchmarks for typical inference workloads

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.8
Install frictionHigh. Source build required
Runtime dependencies
4 packages
typing-extensionsnumpydiskcachejinja2
MaintenanceActively maintained 33 days since the last release
Last repo commit
First released
Downloads732,904 / month, #5,200 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Evidence: llama_cpp_python-0.3.34.tar.gz

Tags

Capabilities
local llm inference pythonllama.cpp python bindingsrun language models locallyopenai-compatible llm apicpu gpu accelerated inferencelangchain llamaindex integrationtext completion api
Topics
llm-inferencelocal-modelsgpu-acceleration

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “llama.cpp python bindings”

  • llama-cpp-pythonPython bindings for llama.cpp that enable running large language…
  • ggufReads and writes binary files in the GGUF (GGML Universal File)…
  • ipex-llmAccelerates large language model inference on Intel hardware (GPU,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Artificial Intelligence packages

litellm With conditions
PyPI · Artificial Intelligence · released Aug 2026

LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.

Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.

MITcompiled wheel
682.8Mdownloads / mo
huggingface-hub Worth it
PyPI · Artificial Intelligence · released Aug 2026

Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.

Install it if you work with Hugging Face Hub models or datasets.

Apache-2.0pure Python · 3.10.0+
442.4Mdownloads / mo
langchain Worth it
PyPI · Python Modules · released Aug 2026

LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.

MITpure Python
315.4Mdownloads / mo
hf-xet With conditions
PyPI · Artificial Intelligence · released Aug 2026

hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.

Apache-2.0compiled wheel · 3.8+
258.4Mdownloads / mo
tokenizers Worth it
PyPI · Artificial Intelligence · released Apr 2026

Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.

Apache-2.0compiled wheel · 3.10+
222.9Mdownloads / mo
transformers Worth it
PyPI · Artificial Intelligence · released Aug 2026

Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.

Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.

permissive licensepure Python · 3.10.0+
186.6Mdownloads / mo

See also gguf · llama-index-llms-openai-like · abstract-hugpy-dev · llama-index-llms-langchain · ipex-llm · llama-index-program-openai · sgl-kernel · sglang-kernel · llama-index-agent-openai · llama-index-multi-modal-llms-openai