# abetlen/llama-cpp-python

Python bindings for llama.cpp

Repository: https://github.com/abetlen/llama-cpp-python
Canonical: https://ross.abutalabs.com/products/llama-cpp-python
Homepage: https://llama-cpp-python.readthedocs.io
Language: Python
License: MIT
License Family: permissive
Last push: 2026-08-17T13:04:43+00:00

## Health v2 (maintenance only)
Score: 92/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 98, release rhythm 86, longevity 89
- inputs: {"age_days": 1259, "days_push": 16, "days_rel": 16, "gap_med": 0.0, "n_releases_24m": 217}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 10585, forks 1446 (observed 2026-08-28T04:10:42.480906+00:00)

## What it is
Python bindings for llama.cpp providing low-level ctypes access to the C API plus a high-level API for text completion with OpenAI-like interfaces. It also ships an OpenAI-compatible web server supporting function calling, vision models, and multiple models.

## Use cases
- run llama.cpp models from python
- serve a local openai-compatible llm api
- run gguf models locally without a gpu cloud
- use a local llm with langchain or llamaindex
- replace github copilot with a local code completion model
- run multimodal vision models locally

## When to choose
- you want to run quantized gguf models locally in python
- you need an openai-compatible endpoint without external services
- you want cpu or custom hardware-accelerated inference via cmake options

## When to avoid
- you need managed multi-node inference at scale
- you prefer a pure-python or cloud-hosted inference stack
- you cannot compile C/C++ and no prebuilt wheel fits your hardware

## Facets
- artifact type: library
- maturity: active
- function: llm-inference, http-server, sdk
- domain: large-language-models, machine-learning, artificial-intelligence, developer-tools
- platform: python, windows, cross-platform
- tags: llama-cpp, gguf, openai-compatible-api, local-llm, langchain, llamaindex, ctypes-bindings, text-generation, linux, macos, gpu

## Member repositories
- abetlen/llama-cpp-python (main) score 92

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:42.480906+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:18:30.216300+00:00, confidence not recorded.
  - readme: https://github.com/abetlen/llama-cpp-python (fetched 2026-08-28T04:10:42.480906+00:00, sha cc84edd758fc)
  - homepage: https://llama-cpp-python.readthedocs.io (fetched 2026-08-29T08:17:39.115330+00:00, sha b5dd3b24fe9f)
  - registry_pypi: https://pypi.org/pypi/llama-cpp-python/json (fetched 2026-08-29T08:17:39.140674+00:00, sha a223f2a87d62)
- Data as of 2026-08-30T08:39:29.467469+00:00.
