llama.cpp

Lightweight C/C++ inference for GGUF models on CPUs, Apple silicon, GPUs and edge devices.

Open source Open source ⌂ Open Models & Runtimes
Visit llama.cpp Opens the vendor's site in a new tab

llama.cpp is an open-source inference project for running language models efficiently in C/C++. It popularised the GGUF format and runs on CPUs, Apple silicon, CUDA, Metal and other backends.

The project provides command-line tools, a server with an OpenAI-compatible endpoint and bindings for several languages. It is optimised for quantised models and limited hardware.

It is aimed at developers who need local inference on consumer hardware, edge devices or servers without a heavyweight Python stack.

llama.cpp is free and open source. Hardware, model files and engineering time are the costs.

The limits are throughput and operational polish. CPU inference is slower, large models need memory, and production serving requires your own monitoring and security layer.

Our take

llama.cpp is the most portable way to run a quantised model. It works on hardware that would choke a Python serving stack, and the GGUF ecosystem gives a practical path to offline inference on a laptop or edge device.

Portability is not throughput. CPU inference is slow for long prompts, large models still need memory, and a production endpoint needs monitoring and security that the project does not provide. Use it where local execution is the point.

What it does

  • GGUF quantised model support.
  • CPU, Apple silicon, CUDA and Metal backends.
  • OpenAI-compatible server mode.
  • Command-line inference tools.
  • Language bindings.
  • Runs on consumer and edge hardware.
  • Low-level control over memory and threads.
  • Active open-source community.

Best for

  • Local inference on consumer hardware.
  • Edge and embedded deployments.
  • GGUF quantised models.
  • Developers who want a lightweight C/C++ stack.
  • Offline and privacy-sensitive use.

Not ideal for

  • High-concurrency production serving.
  • Teams needing a managed endpoint.
  • Workloads requiring the newest model architecture immediately.
  • Applications without hardware or engineering support.

Pros

  • Runs on very modest hardware.
  • Broad backend support.
  • Open-source and portable.
  • GGUF ecosystem.
  • OpenAI-compatible server.
  • Low-level performance control.

Cons

  • CPU inference is slow.
  • Production operations are yours.
  • Model support can lag.
  • Memory limits large models.
  • Less polished than a managed platform.

Pricing and facts

Pricing modelOpen source · from Free
Free tierOpen-source software is free; hardware and operations are your cost.
Pricing detail
  • Software is free and open source.
  • Hardware is your cost.
  • Model files are free or licence-dependent.
  • No per-token fee.
  • Operations are your responsibility.
PlatformsWindows, macOS, Linux, CPU, CUDA, Metal, edge devices
Developerggml-org
Launched2023
Websitehttps://github.com/ggml-org/llama.cpp?utm_source=aibookmarks.net
Last reviewed2026-11-27

Example prompt

Run a 7B GGUF model on a laptop CPU, expose the local OpenAI endpoint, and measure tokens per second at 4-bit and 8-bit quantisation.

Alternatives to llama.cpp

Questions about llama.cpp

What is llama.cpp?

llama.cpp is an open-source inference project for running language models efficiently in C/C++. It popularised the GGUF format and runs on CPUs, Apple silicon, CUDA, Metal and other backends.

The project provides command-line tools, a server with an OpenAI-compatible endpoint and bindings for several languages. It is optimised for quantised models and limited hardware.

It is aimed at developers who need local inference on consumer hardware, edge devices or servers without a heavyweight Python stack.

llama.cpp is free and open source. Hardware, model files and engineering time are the costs.

The limits are throughput and operational polish. CPU inference is slower, large models need memory, and production serving requires your own monitoring and security layer.

Is llama.cpp free?

llama.cpp is open source. Open-source software is free; hardware and operations are your cost.

What is llama.cpp best for?

Local inference on consumer hardware.; Edge and embedded deployments.; GGUF quantised models.; Developers who want a lightweight C/C++ stack.; Offline and privacy-sensitive use.

Listed in Open Models & Runtimes. Something out of date? Tell us.