# llama.cpp

> Canonical: https://skillalmanac.com/glossary/llama-cpp | Last verified: 2026-11-24 | Index status: not offered to search engines

llama.cpp is an open-source C/C++ project for running large language model inference. Its README, published by ggml-org on GitHub, gives its main goal as enabling LLM inference with minimal setup.

Also called: llama cpp, llamacpp, llama-cpp-python, llama.cpp server, what is llama.cpp.

## In plain language

llama.cpp is a program that runs an AI language model on your own computer instead of on a company's servers. You give it a model file, often in the GGUF format, and it answers prompts from the command line or through a small local web server. Other apps are built on top of it, so you may use it without knowing. It is a tool for running a model, not a model: you still have to find a model, and a large one will not fit on every machine. Setup, updates and memory limits are yours to manage, and a local server is only private if you keep it from being reachable by others.

## Technical definition

The llama.cpp README describes the project as LLM inference in C/C++ and says its main goal is to enable LLM (and MLLM) inference with minimal setup; it is built on top of the ggml library. Hugging Face's documentation says llama.cpp can download and run a GGUF model from a Hugging Face repository path, caching the checkpoint, and can serve an OpenAI-spec chat completions endpoint through its server command. Install options include a package manager or building from source with hardware-specific flags, for example CUDA for Nvidia GPUs. Hugging Face's documentation says LM Studio is built on llama.cpp.

## How it shows up when you use agents

llama.cpp is one way to give an agent a local model. You install it or build it, point it at a GGUF file, and start its server, which Hugging Face's documentation says can offer an OpenAI-style chat completions endpoint. A coding agent or script that can talk to such an endpoint then sends requests to your machine. Other tools sit on top of it: Hugging Face says LM Studio is built on llama.cpp, and Ollama's README names it as a backend, so you may already be running it. This is the engine side of a [self-hosted LLM](/glossary/self-hosted-llm).

What breaks when it is misunderstood: people expect a hosted-service experience and get a command-line tool whose flags, builds and hardware options they must manage. Memory limits decide what loads, and a [quantized](/glossary/quantization) file trades quality for size.

Next action: size the model first with [local-model-sizing](/skills/skill-almanac/local-model-sizing), start with the smallest model that suits the task, and read [Self-hosting an AI agent](/learn/self-hosted-ai-agent-considerations) before leaving a server running. See [GGUF](/glossary/gguf) for the file format and [inference](/glossary/inference) for what the engine does.

## Common confusions

- **llama.cpp versus Llama.** [Llama](/glossary/llama) is a family of models; llama.cpp is software that runs models in its supported formats. The name shares a prefix, but the project is not limited to one model family.
- **llama.cpp versus Ollama.** Ollama's README names llama.cpp as its backend. [Ollama](/glossary/ollama) is an application around it, with its own commands and model library.
- **llama.cpp versus GGUF.** GGUF is a file format; llama.cpp is one program that reads it.

## Worked examples in this catalogue

### [Self-Hosting an AI Agent: What You Take On](https://skillalmanac.com/learn/self-hosted-ai-agent-considerations)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: The guide cites the llama.cpp README for its goal of LLM inference with minimal setup and state-of-the-art performance on a wide range of hardware, with Docker and source builds among the install options, and lists what running it yourself makes you responsible for.

Why it exercises the concept: It treats llama.cpp as the engine half of a self-hosted agent, and spells out the setup, exposure and file-access decisions that come with it.

### [local-model-sizing](https://skillalmanac.com/skills/skill-almanac/local-model-sizing)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A check of whether an open-weight language model will run on a given GPU, Mac or PC, with weight, KV-cache and overhead memory per quantization level.

Why it exercises the concept: The llama.cpp README does not tell you whether a model fits your hardware, so sizing it before you download is a useful step.

### [hf-cli](https://skillalmanac.com/skills/huggingface/hf-cli)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: The catalogue lists this skill under ai-ml-engineering without a description line, so read its page before relying on it.

Why it exercises the concept: Hugging Face's llama.cpp page shows pulling a GGUF model from a Hub repository path; this skill is a Hugging Face entry in the catalogue.

## Related terms

- [Inference](https://skillalmanac.com/glossary/inference.md)
- [Quantization](https://skillalmanac.com/glossary/quantization.md)
- [Ollama](https://skillalmanac.com/glossary/ollama.md)
- [Self-hosted LLM](https://skillalmanac.com/glossary/self-hosted-llm.md)
- [Open-weights model](https://skillalmanac.com/glossary/open-weights-model.md)
- [GGUF](https://skillalmanac.com/glossary/gguf.md)
- [llamafile](https://skillalmanac.com/glossary/llamafile.md)
- [KoboldCpp](https://skillalmanac.com/glossary/koboldcpp.md)

## Sources

- [ggml-org/llama.cpp (README)](https://github.com/ggml-org/llama.cpp), ggml-org (GitHub) (accessed 2026-11-24)
- [GGUF usage with llama.cpp](https://huggingface.co/docs/hub/gguf-llamacpp), Hugging Face (accessed 2026-11-24)
- [GGUF usage with LM Studio](https://huggingface.co/docs/hub/lmstudio), Hugging Face (accessed 2026-11-24)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-24. [Glossary index](https://skillalmanac.com/glossary.md).
