# llama.cpp

> Open-source C/C++ LLM inference that runs models on almost any hardware.

- Website: https://github.com/ggml-org/llama.cpp
- Category: AI Models & APIs
- Source page: https://opendirs.com/en/tools/llama-cpp
- Pricing: Open source
- Starting price: $0
- Public API: Yes
- Open source: Yes
- Chinese language: No
- Accessible from mainland China: Unknown
- Platforms: Unknown
- Country: Unknown
- Last verified: Nov 27, 2026

## Overview

llama.cpp is the open-source C/C++ engine for running LLMs locally with minimal setup, powering many desktop AI apps. It uses the GGUF format and quantization to run models on CPUs, Apple Silicon, NVIDIA, AMD, and Vulkan GPUs, and ships tools including a CLI, an OpenAI-compatible server, and a web UI.

**Best for:** Developers and hobbyists running LLMs locally on their own hardware.

## Key features

- GGUF model format with 1.5–8 bit quantization
- CPU, Metal, CUDA, ROCm, and Vulkan backends
- llama-server with OpenAI-compatible API
- Multimodal and embedding support

## Use cases

- Running open models offline on a laptop
- Embedding local inference into apps
- Serving a private model on a small server

## Pros

- Runs on very modest hardware
- Free and open source
- Foundation of the local-AI ecosystem

## Cons

- Command-line oriented
- Quantized models trade some quality for speed

## Alternatives

- [MLX-LM](https://opendirs.com/en/tools/mlx-lm.md)
- [KoboldCPP](https://opendirs.com/en/tools/koboldcpp.md)
- [Mistral](https://opendirs.com/en/tools/mistral.md)
- [exo](https://opendirs.com/en/tools/exo.md)
- [Liquid AI](https://opendirs.com/en/tools/liquid-ai.md)

## FAQ

### What is llama.cpp?

llama.cpp is the open-source C/C++ engine for running LLMs locally with minimal setup, powering many desktop AI apps. It uses the GGUF format and quantization to run models on CPUs, Apple Silicon, NVIDIA, AMD, and Vulkan GPUs, and ships tools including a CLI, an OpenAI-compatible server, and a web UI.

### Is llama.cpp free?

llama.cpp uses a Open source pricing model (verified Nov 27, 2026).

### Does llama.cpp have an API?

Yes. llama.cpp offers an API for developers.

### Does llama.cpp support Chinese, and is it available in China?

llama.cpp does not support Chinese, and it has unverified availability in mainland China.

### What are the best alternatives to llama.cpp?

Popular alternatives to llama.cpp include MLX-LM, KoboldCPP, Mistral, exo.

_Last verified: Nov 27, 2026_