[Purpose] The main goal of llama.cpp is to enable users to achieve LLM (and VLM) inference on various hardware (local or cloud) with minimal configuration and state-of-the-art performance. It is the underlying inference engine for many local AI applications.
[Main Capabilities]
- Pure C/C++ implementation with no additional dependencies.
- First-class optimization for Apple Silicon, using ARM NEON, Accelerate, and the Metal framework.
- Support for AVX, AVX2, AVX512, and AMX for the x86 architecture.
- Support for RVV, ZVFH, ZFH, ZICBOP, and ZIHINTPAUSE for the RISC-V architecture.
- Provides 1.5-bit, 2-bit, 3-bit, 4-bit, 5-bit, 6-bit, and 8-bit integer quantization to accelerate inference and reduce memory usage.
- Provides custom CUDA kernels for running LLMs on NVIDIA GPUs, and supports AMD GPUs via HIP and Moore Threads GPUs via MUSA.
- Supports the Vulkan and SYCL backends.
- Supports CPU+GPU hybrid inference, enabling partial acceleration for models larger than the total VRAM capacity.
- The project is built on top of the ggml library.
[Installation Methods] The material lists several ways to install llama.cpp:
- Visit https://llama.app and follow the instructions.
- Run with Docker; see the Docker documentation.
- Download precompiled binaries from the releases page.
- Build from source by cloning this repository; see the build guide.
[Usage] It can be used after installation. The repository navigation lists entries such as ggml, ops, maintainer PRs, development statistics, the lib llama API, and the llama-server REST API.
[Applicable Scenarios] Suitable for scenarios that require running LLM (and VLM) inference with minimal configuration on a wide range of hardware (local or cloud), including Apple Silicon, x86, RISC-V, NVIDIA/AMD/Moore Threads GPUs, and other platforms.
[Limitations and Additional Notes] The material does not provide specific pricing, prices, or performance data. For performance troubleshooting, the repository also has documentation entries such as performance troubleshooting, multi-GPU usage, GGML tips, and the release process. The project also acknowledges several single-header libraries (cpp-httplib, stb, nlohmann/json, miniaudio, subprocess.h) and has a security policy.