LLM inference in C/C++ https://llama.app
Find a file
2026-10-01 19:57:34 +03:00
.devops musa: build the docker image and CI container from the MUSA SDK images (#29624) 2026-09-29 10:42:20 +02:00
.gemini
.github CUDA: Make CCCL configurable + pin it to 3.4.3 for CI jobs (#29792) 2026-10-01 13:05:29 +02:00
.pi/gg
app
benches
ci CUDA: Make CCCL configurable + pin it to 3.4.3 for CI jobs (#29792) 2026-10-01 13:05:29 +02:00
cmake
common Qwen4Exp: add MTP (#29761) 2026-10-01 14:13:27 +03:00
conversion convert : write Gemma embedding scale for DFlash drafts (#29802) 2026-10-01 16:34:32 +02:00
docs CUDA: Make CCCL configurable + pin it to 3.4.3 for CI jobs (#29792) 2026-10-01 13:05:29 +02:00
examples batch: migrate the rest of examples to llama_batch_ext (#29601) 2026-09-30 18:08:43 +02:00
ggml hexagon: shared strided DMA copy for CPY and CONCAT, any-dim CONCAT via DMA (#29685) 2026-10-01 08:38:37 -07:00
gguf-py Qwen4Exp: add MTP (#29761) 2026-10-01 14:13:27 +03:00
grammars
include
licenses
media
models common : add LLM-jp-4.1 Harmony dialect handler (#29681) 2026-10-01 08:33:55 +03:00
pocs
requirements
scripts Hexagon: optimize ALLREDUCE with support for safe scatter mode (#29757) 2026-09-30 12:56:44 -07:00
skills
src llama : clamp kpool re-pool bound to existing pools (#29805) 2026-10-01 19:55:34 +03:00
tests ci: fix Fusion / metal by updating the qwen4exp baseline (#29812) 2026-10-01 19:57:34 +03:00
tools server: return HTTP 400 for invalid embedding requests (#29060) 2026-10-01 16:52:43 +02:00
vendor vendor: update BoringSSL to 0.20260929.0 (#29669) 2026-09-30 12:44:32 +08:00
.clang-format
.clang-tidy
.dockerignore
.ecrc
.editorconfig
.flake8
.gitignore
.gitmodules
.pre-commit-config.yaml
AGENTS.md
AUTHORS
build-xcframework.sh
CLAUDE.md
CMakeLists.txt
CMakePresets.json
CODEOWNERS codeowners : remove former ZenDNN owner (#29747) 2026-09-30 22:38:21 +08:00
CONTRIBUTING.md
convert_hf_to_gguf.py
convert_hf_to_gguf_update.py
convert_llama_ggml_to_gguf.py
convert_lora_to_gguf.py
flake.nix
LICENSE
Makefile
mypy.ini
pyproject.toml
pyrightconfig.json
README.md
requirements.txt
SECURITY.md
ty.toml

llama.cpp

llama

Quick start

A few options to get llama.cpp installed on your machine:

Once installed:

# Download and run a model directly from Hugging Face
llama cli -hf ggml-org/Qwen3.5-0.8B-GGUF

# Launch OpenAI-compatible API server
llama serve -hf ggml-org/Qwen3.5-0.8B-GGUF
VLM session with `llama cli` VLM session with llama cli Built-in web UI against `llama serve` running Qwen 3.6 Built-in web UI against llama serve

Description

The main goal of llama.cpp is to enable LLM (and VLM) inference with minimal setup and state-of-the-art performance on a wide range of hardware - locally and in the cloud.

  • Plain C/C++ implementation without any dependencies
  • Apple silicon is a first-class citizen - optimized via ARM NEON, Accelerate and Metal frameworks
  • AVX, AVX2, AVX512 and AMX support for x86 architectures
  • RVV, ZVFH, ZFH, ZICBOP and ZIHINTPAUSE support for RISC-V architectures
  • 1.5-bit, 2-bit, 3-bit, 4-bit, 5-bit, 6-bit, and 8-bit integer quantization for faster inference and reduced memory use
  • Custom CUDA kernels for running LLMs on NVIDIA GPUs (support for AMD GPUs via HIP and Moore Threads GPUs via MUSA)
  • Vulkan and SYCL backend support
  • CPU+GPU hybrid inference to partially accelerate models larger than the total VRAM capacity

The llama.cpp project is build on top of the ggml library.

Supported backends

Backend Target devices
BLAS All
BLIS All
CANN Ascend NPU
CUDA Nvidia GPU
HIP AMD GPU
Hexagon Snapdragon
IBM zDNN IBM Z & LinuxONE
MUSA Moore Threads GPU
Metal Apple Silicon
OpenCL Adreno GPU
OpenVINO [In Progress] Intel CPUs, GPUs, and NPUs
RPC All
SYCL Intel GPU
VirtGPU VirtGPU APIR
Vulkan GPU
WebGPU All
ZenDNN AMD CPU

Documentation

Tools

Development

Contributing

  • Contributors can open PRs
  • Collaborators will be invited based on contributions
  • Maintainers can push to branches in the llama.cpp repo and merge PRs into the master branch
  • Any help with managing issues, PRs and projects is very appreciated!
  • Read the CONTRIBUTING.md for more information

Acknowledgements

  • yhirose/cpp-httplib - Single-header HTTP server, used by llama-server - MIT license
  • nothings/stb - Single-header image format decoder, used by multimodal subsystem - Public domain
  • nlohmann/json - Single-header JSON library, used by various tools/examples - MIT License
  • mackron/miniaudio - Single-header audio format decoder, used by multimodal subsystem - Public domain
  • sheredom/subprocess.h - Single-header process launching solution for C and C++ - Public domain