Skip to content

Menu

llama.cpp logo

llama.cpp

Published

API Tools

At a glance

What it is
llama.cpp is an open-source project for running large language models in C and C++.
Price from
Open source Details
Best for
Running open-weight models locally; Self-hosting an OpenAI-compatible endpoint
Official site
github.com
Last checked
November 2026
Watch out for
It works with GGUF files, so models published in other formats need converting or a pre-converted copy before they will load.

llama.cpp is an open-source project for running large language models in C and C++. It lives under the ggml-org organisation on GitHub and is built on top of the ggml tensor library from the same group. The README states its goal plainly: LLM and multimodal LLM inference with minimal setup on a wide range of hardware, both locally and in the cloud. The README now points to a v1.0.0 release alongside nightly builds.

Most developers meet it through its command-line tools rather than the C library. You can install it with a one-line script from llama.app, pull pre-built binaries from the GitHub releases page, run it in Docker, or build it from source. From there, `llama cli` downloads a GGUF model straight from Hugging Face and opens a chat session, and `llama serve` starts an OpenAI-compatible API server with a built-in chat app called Llama Chat. Teams that want to embed inference in their own software can call the libllama API directly.

Models are loaded in the GGUF format, and the docs cover text models, vision models and text-to-speech models. GBNF grammars let you constrain output to a fixed structure such as JSON. The build guide lists a long set of backends: CPU with optional BLAS, Apple Metal, CUDA, HIP, Vulkan, SYCL, MUSA, CANN, OpenCL, WebGPU, OpenVINO, Hexagon, Arm KleidiAI and more. The catch is that picking and tuning the right build for your hardware is your job, and the project has a separate guide just for performance troubleshooting.

Key features

Wide hardware support
The build guide documents CPU, Metal, CUDA, HIP, Vulkan, SYCL, OpenCL, WebGPU, CANN and several other backends.
OpenAI-compatible server
`llama serve` exposes a REST API that existing OpenAI client code can call, plus a built-in web chat app.
Direct Hugging Face downloads
The `-hf` flag fetches a GGUF model from Hugging Face and runs it in one command.
Multimodal and TTS
The docs cover vision-language sessions in the CLI and text-to-speech models.
Grammar-constrained output
GBNF grammars restrict generation to a defined format, which helps when you need valid JSON.
Multi-GPU and Android guides
Separate docs explain splitting work across GPUs and building for Android, with an XCFramework for Apple apps.

Pricing

As of November 2026, llama.cpp is free and open source under the MIT licence. There is no paid tier or hosted service listed in the official repository. Your costs are the hardware or cloud machines you run it on, plus any licence terms attached to the model weights you choose.

Best for

  • Running open-weight models locally
  • Self-hosting an OpenAI-compatible endpoint
  • Embedding inference in C or C++ apps
  • Unusual or non-NVIDIA hardware

Limitations

  • It works with GGUF files, so models published in other formats need converting or a pre-converted copy before they will load.
  • Getting good speed often means choosing the right backend build and flags, which the project addresses with a dedicated performance troubleshooting guide.
  • It runs models but does not provide agents, retrieval pipelines or a model catalogue, so those pieces come from other tools.
  • The bundled chat app is basic compared with desktop front ends such as LM Studio.

Verdict

llama.cpp is the engine underneath a lot of local AI tooling, and using it directly gives you more control over builds, backends and server flags than wrapper apps do. Expect to spend some time on setup and tuning. If you just want a model running on a laptop with no configuration, a friendlier wrapper may suit you better.

Sources

Written from the vendor's own site and documentation, checked November 2026. We have no paid relationship that affects what this page says.

How we research: where our facts come from, how often we re-check them, and why no one can pay for a review or a verdict.

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…