llama.cpp: run language models locally in plain C and C++
llama.cpp is an open-source project that runs language models on your own computer, from CPUs to GPUs, with a command line and an OpenAI-compatible server.
What it is: llama.cpp is an open-source C/C++ project for running large language models locally or in the cloud. Its stated goal is to run models with minimal setup and strong performance on a wide range of hardware. It is a plain C/C++ implementation without dependencies, built on the ggml library.
Who it is for: developers who want to understand how local models run, embed a model in an application, or get more control than a friendly app offers.
Why it is worth starring: it supports many hardware backends, including Apple silicon through Metal, CUDA and Vulkan. It can shrink models with quantization, and it can split work between the CPU and the GPU for models that do not fit in video memory. Models use the GGUF format, and the command line can download one straight from Hugging Face. The included server speaks an OpenAI-compatible API, so existing client code can point at it.
# Download a model from Hugging Face and chat with it
llama-cli -hf ggml-org/gemma-3-1b-it-GGUF
# Start an OpenAI-compatible API server
llama-server -hf ggml-org/gemma-3-1b-it-GGUFOne limitation: it is a toolkit, not a polished app. You choose model files, quantization levels and build options, and speed varies a lot with hardware, model size and quantization. Command names also change between versions, so check the README for the current ones. If you only want to try a model quickly, a friendlier wrapper such as Ollama is easier to start with.
Comments
Comments are optional. Loading them connects your browser to Giscus and GitHub. Read the privacy details.