A llama.cpp fork focused on CPU inference speed, with extra quantization types and features for running GGUF LLMs locally.
ggml-org/llama.cpp
LLM inference engine in plain C/C++ for running large language and vision-language models locally or in the cloud across many hardware backends.
Open-source alternative to:OpenAI API
Ollama
- Stars
- 131,780
- Forks
- 24,581
- Open issues
- 2,565
- Last commit
- 6 hours ago
What is it?
llama.cpp is an inference engine for large language models (LLMs) and vision-language models (VLMs), written in plain C/C++ with no external dependencies. It aims to make model inference easy to set up and fast across a wide range of hardware, both on personal machines and in the cloud. It is built on the ggml tensor library.
The project covers a broad set of hardware: Apple silicon through ARM NEON, Accelerate and Metal, x86 CPUs with AVX/AVX2/AVX512/AMX, RISC-V vector extensions, and GPUs from NVIDIA (CUDA), AMD (HIP), Moore Threads (MUSA), Intel (SYCL), and others via Vulkan, OpenCL and WebGPU. It supports integer quantization from 1.5-bit up to 8-bit to reduce memory use, and can split models between CPU and GPU when they exceed VRAM.
The repository ships command-line tools, including `llama cli` for interactive sessions and `llama serve` for an OpenAI-compatible API server with a built-in web UI. Models can be pulled directly from Hugging Face, and Docker images and prebuilt binaries are available.
Key features
- 01Plain C/C++ implementation with no external dependencies
- 02Hardware acceleration for Apple Metal, x86 AVX/AMX, CUDA, HIP, Vulkan, SYCL and more
- 03Integer quantization from 1.5-bit to 8-bit to reduce memory use
- 04CPU+GPU hybrid inference for models larger than available VRAM
- 05OpenAI-compatible API server with a built-in web UI
Use cases
- Running open-weight LLMs locally on a laptop or desktop without a cloud service
- Serving a local OpenAI-compatible endpoint for applications that already use that API
- Running quantized models on limited-memory or edge hardware
- Experimenting with inference on specific accelerators such as Apple silicon, Vulkan GPUs or Ascend NPUs
Quick start
- 1
Run the official install script from the README
- 2
Download pre-built binaries from the releases page
- 3
Download and run a model directly from Hugging Face
llama cli -hf ggml-org/Qwen3.5-0.8B-GGUF - 4
Launch the OpenAI-compatible API server
llama serve -hf ggml-org/Qwen3.5-0.8B-GGUF
Things to know
- Some backends, such as CUDA, Metal, and SYCL, only apply to specific hardware.
- The OpenVINO backend is still marked as in progress.
Topics
FAQ
- What is llama.cpp?
- LLM inference engine in plain C/C++ for running large language and vision-language models locally or in the cloud across many hardware backends. llama.cpp is an inference engine for large language models (LLMs) and vision-language models (VLMs), written in plain C/C++ with no external dependencies. It aims to make model inference easy to set up and fast across a wide range of hardware, both on personal machines and in the cloud. It is built on the ggml tensor library.
- Is llama.cpp free to use? What license does it have?
- llama.cpp is open source under the MIT license. Check the license terms before using it in commercial products.
- Is llama.cpp still maintained?
- Actively maintained. The last commit to llama.cpp was on Oct 20, 2026.
- What can I use llama.cpp for?
- Running open-weight LLMs locally on a laptop or desktop without a cloud service Serving a local OpenAI-compatible endpoint for applications that already use that API Running quantized models on limited-memory or edge hardware Experimenting with inference on specific accelerators such as Apple silicon, Vulkan GPUs or Ascend NPUs
- How do I install llama.cpp?
- Run the official install script from the README Download pre-built binaries from the releases page Download and run a model directly from Hugging Face: llama cli -hf ggml-org/Qwen3.5-0.8B-GGUF Launch the OpenAI-compatible API server: llama serve -hf ggml-org/Qwen3.5-0.8B-GGUF
- Where can I get llama.cpp?
- The source code and installation instructions are on GitHub: https://github.com/ggml-org/llama.cpp
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A fast, memory-efficient library and server for running and serving large language models with an OpenAI-compatible API.
Python library that runs large language models layer by layer so 70B-class models can infer on a single 4GB GPU, without quantization.
A Rust CLI and TUI that detects your CPU, RAM and GPU, then ranks open LLMs by how well they will run on your machine.
An edge-native MoE serving engine that runs large open-weight models like DeepSeek-V4 and Qwen3.6 on consumer GPUs and CPUs.
A CLI that detects your GPU, CPU and RAM and ranks the HuggingFace local LLMs that actually run on your hardware, by benchmarks rather than parameter count.