Debuly
llama.cpp logo

llama.cpp

Open-source engine and desktop app for running LLMs locally, with a built-in OpenAI-compatible API server and web chat UI.

Open source

What is llama.cpp?

llama.cpp is an open-source project for running large language models on your own computer, laptop or server. It loads models in the GGUF format, which packs the weights, tokenizer and metadata into one file, and thousands of ready-made GGUF models are on Hugging Face. The project ships a free Llama desktop app for Mac and Windows (a 1 MB download that lives in the menu bar or system tray), plus command-line tools: llama cli for chatting in a terminal and llama serve for an HTTP server with a web UI. The server speaks the OpenAI API and an Anthropic-style messages endpoint, supports streaming, tool calling, structured JSON output, vision, embeddings and reranking, and handles several users at once with continuous batching. The desktop app picks quantization and context size to suit your hardware, loads models on demand and unloads them after 5 idle minutes. llama.cpp is free and open source, with no API keys or usage bills, and it works offline.

Use cases

  • Run open LLMs offline on a laptop
  • Serve a local OpenAI-compatible API
  • Point coding agents at a local model
  • Generate embeddings for retrieval
  • Rerank documents against a query
  • Run vision models on local images
  • Chat with a model in the terminal

Who it's for

  • Developers
  • ML engineers
  • AI hobbyists
  • Self-hosting teams

Why use llama.cpp

  • Keeps prompts and files on your own machine, and the app works with no internet connection.
  • Existing code written for the OpenAI API only needs its base URL changed, with no API keys or per-token bills.
  • The desktop app chooses quantization, context size and batch size for your hardware, so setup takes a few clicks.
  • Several apps can share one local server and one copy of each model instead of bundling their own engine.
  • Every setting is still available in one plain-text file for people who want full control.

llama.cpp features

  • Llama desktop app for Mac and Windows with a 1 MB download
  • llama cli for terminal chat and llama serve for an HTTP API
  • OpenAI-compatible endpoints plus an Anthropic-style /v1/messages route
  • Built-in browser chat interface served by llama serve
  • Streaming, tool calling and JSON-schema structured output
  • Image and audio input for multimodal models
  • Embedding and reranking endpoints for retrieval workflows
  • Parallel request slots with continuous batching and prompt caching
  • Speculative decoding with a small draft model
  • Router mode for serving several models from one server
  • Optional API key requirement and Docker image for servers

llama.cpp integrations

  • Hugging Face
  • OpenAI SDK
  • Anthropic SDK
  • Docker
  • Tailscale

How to get started with llama.cpp

  1. Install the Llama app with Homebrew or a download on Mac and Windows, or run the install script for the command-line version on Linux.
  2. Pick a recommended model that fits your computer, or pass a Hugging Face GGUF repo to llama serve with the -hf flag.
  3. Open the chat from the menu bar, or browse to localhost:9931 for the web UI.
  4. Point your editor, coding agent or script at localhost:9931/v1 using any OpenAI SDK.
  5. Adjust context size, GPU offload and parallel slots with flags or environment variables when you need to.

llama.cpp limitations

  • Models run in the GGUF format, so other formats need converting
  • Model size is bounded by the memory on your own machine
  • Linux users install the command-line version rather than the desktop app

llama.cpp pricing

llama.cpp is open source, so you can use and self-host it for free.

Prices can change and may vary by country or exclude tax. Check the official pricing page.

llama.cpp alternatives

The main llama.cpp alternatives listed on Debuly are Ollama, LM Studio, vLLM, LocalAI, MLX and Jan. The table compares pricing and platforms; order is A–Z.

llama.cpp compared with its alternatives
ToolPricingStarting pricePlatforms
llama.cppOpen source—macOS, Windows, Linux, CLI
JanOpen source—Windows, macOS, Linux, Self-hosted
LM StudioFreemium$20/momacOS, Windows, Linux, CLI
LocalAIOpen source—Linux, macOS, Docker, Kubernetes
MLXOpen source—macOS, Linux, Python, Swift
OllamaOpen source$20/momacOS, Windows, Linux, API
vLLMOpen source—Docker, Python, API, Self-hosted
  1. Jan

    Free, open-source desktop AI assistant that runs models offline on your computer or connects to cloud models with your own keys.

  2. LM Studio

    Desktop app for running open language models on your own computer, now with the Bionic agent, a local API and optional US-hosted cloud models.

  3. LocalAI

    MIT-licensed open-source runtime that serves local models through OpenAI- and Anthropic-compatible APIs for text, images, audio and agents.

  4. MLX

    Open-source array framework from Apple machine learning research for training and running models on Apple silicon.

  5. Ollama

    Open-source app and CLI for running open AI models locally on macOS, Windows and Linux, with optional paid cloud models.

  6. vLLM

    Open-source engine for serving LLMs with PagedAttention, continuous batching and an OpenAI-compatible API.

llama.cpp FAQ

Is llama.cpp free?

Yes. The Llama app is listed as free and open source, and running models locally means no API keys and no usage bills.

How much does llama.cpp cost?

Nothing. The site lists the app as a free 1 MB download, and it publishes no paid plans. Your only costs are the hardware and the disk space for the models you download.

Does llama.cpp have an API?

Yes. llama serve exposes OpenAI-compatible endpoints under /v1, an Anthropic-compatible /v1/messages endpoint, and native llama.cpp endpoints. It supports streaming, tool calling, structured output, embeddings and reranking.

Which platforms does llama.cpp run on?

The Llama app is available for Mac and Windows. On Linux you install the command-line version with the install script, and a Docker image is available for servers.

Can llama.cpp work offline?

Yes. The site says the Llama app works offline once a model has been downloaded.

What are alternatives to llama.cpp?

Alternatives for running models locally include Ollama, LM Studio, vLLM, LocalAI and MLX, which differ in how much they favor a desktop interface, server throughput or a particular hardware family.

Sources & verification

Facts on this page come from the official sources below, each with the date we read it. Written by Debuly; the vendor did not review this page.

SourceTypeAccessed
llama.appofficial
github.com/ggml-org/llama.cpprepository
llama.app/official
llama.app/docs/introductiondocs
llama.app/docs/servedocs
llama.app/docs/apidocs

Image credits

  • Logo: from llama.app · fetched · Vendor trademark, used only to identify the product; removed on request
  • Cover: none collected yet, so a generated tile is shown.

Spot an error? Report an issue with this listing. We also remove a logo or image on the owner's request.