Skip to content

llama.cpp

C/C++ engine for running open LLMs locally, with a CLI and an OpenAI-compatible server

Permissive (OSI) · MIT AI-native
  • macOS
  • Linux
  • CLI

Listed by , founder & editor

70

Health

Active

Overview

Stars

136,134

Last commit

today

Nov 2026

Repository age

3 years

since Mar 2023

Latest version

v1.0.0

Nov 2026

Contributors

–

54 active in 90 days

Releases

0

last 12 months

Language

C++

llama.cpp is an inference engine for large language models, written in C and C++ on top of the ggml library. It aims to run LLMs and multimodal models locally or in the cloud with minimal setup on a wide range of hardware.

The llama cli command downloads a model straight from Hugging Face and runs it in your terminal. llama serve launches an OpenAI-compatible API server, and a built-in chat app, Llama Chat, can connect to it. It also includes text-to-speech support and GBNF grammars. Builds cover Docker, Android, multi-GPU setups and an XCFramework, and you can also use the library API directly.

You can install it with a curl or PowerShell script, download pre-built binaries, use Docker or build from source. It uses the MIT license and has had 56 contributors in the last 90 days. It is an alternative to LM Studio and Ollama for people who want the upstream engine and more control over the hardware.

Who it's for

Developers who want direct control over local inference

You get the reference engine with build options for many hardware targets and multi-GPU use.

Skip if: You want a polished model manager with simple pull names.

Teams exposing a local model through an OpenAI-compatible API

llama serve provides that endpoint from a single command.

Skip if: You need a built-in MCP client.

App developers embedding LLM inference

A C/C++ library API and an XCFramework are available.

Skip if: You only want to chat with a model and prefer a graphical app.

The problem it solves

Running open models locally often means depending on a wrapper app that trails behind the engine. llama.cpp gives you the engine itself, with a CLI, a server and a chat app.

Strengths

  • Downloads and runs models directly from Hugging Face
  • OpenAI-compatible server through llama serve
  • Built-in chat app, text-to-speech and GBNF grammars
  • Install by script, binaries, Docker or source build
  • MIT licensed with 56 contributors in the last 90 days

Trade-offs

  • Model management is less polished than LM Studio or Ollama
  • No built-in library of models with short pull names
  • Tuning for your hardware takes more reading than a wrapper app

llama.cpp replaces

Self-host llama.cpp

Self-hostable
Yes

Quick start

curl -LsSf https://llama.app/install.sh | sh

From the project's own install instructions. Check the docs for production settings.

Frequently asked questions

Is llama.cpp free?

Yes. It is MIT licensed.

Can I self-host it?

Yes. llama serve runs an OpenAI-compatible API server on your own machine.

How do I install it?

Use the curl or PowerShell install script, pre-built binaries, Docker or a source build.

Where do models come from?

You can pull GGUF models from Hugging Face with the -hf option.

Other LM Studio alternatives

Compare all 5 LM Studio alternatives →

Similar tools in Local LLM runtimes

llmfit

Local LLM runtimes

Terminal tool that checks which open LLMs your CPU, RAM and GPU can run

39k 2.5k today Thriving MIT

LocalAI

Local LLM runtimes

Self-hosted server for running open text, image and speech models behind an OpenAI-style

51k 4.6k today Thriving MIT

Replaces LM Studio

Rapid-MLX

Local LLM runtimes

Local LLM inference server for Apple Silicon Macs, built for coding agents

4.2k 445 today Thriving Apache-2.0

Replaces LM Studio

colibri

Local LLM runtimes

C inference engine that runs huge mixture-of-experts LLMs on ordinary hardware

53k 6.4k yesterday Thriving Apache-2.0

exo

Local LLM runtimes

Cluster software that pools your Macs and other devices to run large AI models locally

49k 3.6k 17 days ago Active Apache-2.0

Shimmy

Local LLM runtimes

Local GGUF inference server and CLI in Rust with an OpenAI-compatible API

6k 587 11 days ago Active Apache-2.0