LLM inference in C/C++

★ 135,174⑂ 25,641👁 926⑃ 17,262● 10,872▤ 8,170
C++MITCreated 2023-03-10llama.app
下载:v1.0.0v1.0.0 ↓1.0.02026-11-13
+134
日增长
+1,381
周增长
135,174
stars
25,641
forks
926
watchers
17,262
prs
10,872
issues
8,170
releases

README

llama.cpp

!llama.cpp



LLM inference in C/C++








ggml / ops / maintainer PRs%20sort%3Aupdated-desc) / dev stats / lib llama API / llama-server REST API



 Quick start

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

bash
 curl
curl -LsSf https://llama.app/install.sh | sh

 powershell
irm https://llama.app/install.ps1 | iex


- Visit https://llama.app and follow the instructions
- Run with Docker - see our Docker documentation
- Download pre-built binaries from the releases page
- Build from source by cloning this repository - check out our build guide

Once installed:

sh
 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
        
        
            
            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 | Huawei 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]](docs/backend/OPENVINO.md) | Intel CPUs, GPUs, and NPUs |
| RPC | All |
| SYCL | Intel GPU |
| VirtGPU | VirtGPU APIR |
| Vulkan | GPU |
| WebGPU | All |
| ZenDNN | AMD CPU |

 Documentation

 Tools

- cli
- completion
- server
- Text-to-speech (TTS) models
- GBNF grammars

 Development

- How to build
- Running on Docker
- Build on Android
- Multi-GPU usage
- Performance troubleshooting
- GGML tips & tricks
- XCFramework
- Completions
- Models
- Release process

 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 HT

Top issues

Discussions

Latest release

v1.0.0 v1.0.0 2026-11-13
Blog post: https://huggingface.co/blog/ggml-org/llama-cpp-v1

 Overview

llama.cpp v1.0.0 removes the deprecated public API and promotes the NextN/speculative API to llama.h, adds OCP FP8 KV caches, a host-memory MoE expert cache with a configurable CPU share, and loading of external PLE shards. It adds three text architectures (Kimi-K3.1-Pro, Ripple and xing4_0), drama-3 TTS, and MageVL-Cowork and Kimi-K3.1 vision, hardens llama-server (SSRF, CORS, DNS rebinding, MCP tool cancellation) and adds a /v1/audio/speech endpoint, ships a redesigned web UI with chat groups and a markdown editor, 

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON