Tools / llama.cpp

llama.cpp Review

The dependency-free C/C++ inference engine behind much of the local-LLM world

Last reviewed: October 2026

TL;DR

llama.cpp is the reference engine for running quantized LLMs in the GGUF format on almost any hardware: CPUs with AVX or AMX, Apple Silicon through Metal, and GPUs through CUDA, HIP, Vulkan, SYCL, and more. It ships an OpenAI-compatible server with a built-in web UI and can pull models straight from Hugging Face. Tools such as Ollama and LM Studio build on it, so reach for llama.cpp itself when you want control rather than convenience.

License

MIT

Self-hosted

Yes

Cloud option

None

GitHub stars

130.9K★

Checked October 2026

Category

AI Assistants & Local Models

Pricing

Free and open source

What is llama.cpp?

llama.cpp is an LLM inference project in plain C/C++ with no dependencies. The README lists a very broad set of backends: BLAS, BLIS, CANN for Ascend NPUs, CUDA for NVIDIA, HIP for AMD, Hexagon for Snapdragon, IBM zDNN, MUSA for Moore Threads, Metal for Apple Silicon, OpenCL for Adreno, OpenVINO (in progress), RPC, SYCL for Intel GPUs, VirtGPU, Vulkan, WebGPU, and ZenDNN for AMD CPUs. On CPUs it uses ARM NEON and Accelerate on Apple, AVX, AVX2, AVX512, and AMX on x86, and supports RISC-V, and a hybrid CPU and GPU mode runs models larger than your VRAM. Quantization spans 1.5-bit to 8-bit including 2-, 3-, 4-, 5-, and 6-bit. The server provides an OpenAI-compatible API with a built-in web UI, parallel and speculative decoding, embeddings, and reranking, and vision-language models are supported.

Installation & self-hosting

There is a curl install script for Linux and macOS and a PowerShell script for Windows, a guided setup at llama.app, Docker images, prebuilt binaries on the GitHub releases page, and building from source with the linked build guide. You can download a model directly from Hugging Face with the -hf flag, for example llama cli -hf ggml-org/Qwen3.5-0.8B-GGUF or llama serve -hf ggml-org/Qwen3.5-0.8B-GGUF. Hardware needs depend on the model and quantization you choose, so size by file size plus context memory.

User experience

llama.cpp is a toolbox of command-line programs and a server rather than a polished app: you choose the model, quantization, context size, and layer offloading yourself. The built-in web UI in the server gives you a basic chat, and the OpenAI-compatible API lets any client talk to it. This section reflects the README and OpenAlternative; we did not run benchmarks.

Key features

  • Backends for CUDA, HIP, Metal, Vulkan, SYCL, OpenCL, CANN, MUSA, and more, plus CPU-only inference
  • Hybrid CPU and GPU inference for models larger than VRAM
  • Quantization from 1.5-bit to 8-bit in the GGUF format
  • OpenAI-compatible server with a built-in web UI, embeddings, and reranking
  • Parallel and speculative decoding and grammar-constrained (GBNF) output
  • Vision-language model support
  • Direct downloads from Hugging Face with the -hf flag

What llama.cpp does well

  • The widest hardware coverage of any inference engine, including unusual accelerators
  • Fine control over quantization, memory, and performance
  • MIT license and a very large community, with about 131,000 stars
  • Many projects build on it, so improvements flow to the whole ecosystem

Where llama.cpp falls short

  • Command-line and flag heavy, so it is a steeper start than Ollama or LM Studio
  • No model-management layer comparable to higher-level tools, so you handle model files and formats yourself
  • Fast development means flags, defaults, and supported architectures change often
  • The captured README does not document its limitations or supported model families, which live in separate docs
  • Some backends, such as OpenVINO, are still in progress

Pricing

llama.cpp is free under the MIT license. Your costs are the hardware and electricity, plus model downloads.

llama.cpp vs LM Studio

LM Studio is a graphical desktop app that wraps local model discovery, download, and chat, and Together AI and Fireworks AI are hosted inference services. llama.cpp is the engine under many such tools. Choose it when you want a headless server, an embedded runtime, or control over performance, and choose Ollama or LM Studio when you want convenience. Ollama is the middle ground: a friendlier wrapper with sensible defaults.

See all LM Studio alternatives

Best for

  • Developers embedding local inference in their own software
  • Users who want maximum control over quantization and hardware use
  • Running models on unusual or modest hardware, including CPU-only machines
  • Servers that need an OpenAI-compatible endpoint without extra layers

Not ideal for

  • Beginners who want a one-click chat app
  • Teams that want a managed inference service
  • Anyone who does not want to manage model files and flags

Alternatives

Final verdict

llama.cpp is the foundation of local LLMs and the right tool when you need performance, portability, or an embedded runtime. Most people will be happier starting with Ollama or LM Studio and moving down to llama.cpp when they hit a limit.

Sources