+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 HTTop issues
#10528Misc. bug: Inconsistent Vulkan segfault83 comments · 2024-11-26#10982Research: Performance differences between Metal (macOS) and Vulkan (Linux)58 comments · 2024-12-26#14909Feature Request: Implement missing ops from backends56 comments · 2025-07-28#2164mpi : attempt inference of 65B LLaMA on a cluster of Raspberry Pis54 comments · 2023-07-10#11970Misc. bug: The KV cache is sometimes truncated incorrectly when making v1/chat/completions API calls50 comments · 2025-02-20#24066Eval bug: Vulkan: performance drop in recent builds49 comments · 2026-06-03#25618Eval bug: Speculative decoding (draft-mtp / draft-dspark): greedy output diverges from vanilla on quantized targets43 comments · 2026-07-13#14702Misc. bug: OpenAI API v1/responses llama-server41 comments · 2025-07-15
Discussions
#32298RFC: Q2_0C/Q4_0C weight quantization with per-channel scale and offset3 comments · 2026-11-15#32285Opt-in sparse-backed KV cache allocation (Vulkan / Linux CPU) to avoid upfront VRAM reservation0 comments · 2026-11-14#32234Capping CPU clock on a hot laptop: same MoE token speed, 16 °C cooler (GPU/CPU expert split)2 comments · 2026-11-13#32226Quantized KV + --kv-unified is much slower than f16 KV on long context, and a PR proposal for its improvement1 comments · 2026-11-13#32211Fusion: a cloud or local planner driving llama-server parallel slots as a pool of agent workers1 comments · 2026-11-13#32180Reduce Grammar Reliance for Tool Calling1 comments · 2026-11-13#32171Lossless Speculative Decoding for Looped Models (Ouro Family): Draft with 1 Loop, no Draft Model1 comments · 2026-11-12#32165Ryzen 7 255, Radeon 780M benchmarking Vulkan versus ROCm (7.2)0 comments · 2026-11-12
Latest release
v1.0.0 v1.0.0 2026-11-13Blog 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,
相关报道 (6)
alphaXivBaseRT: 在 Apple 芯片上通过原生 Metal 实现同类最佳的 LLM 推理2026-09-02blog.upx8.comWindows本地AI升级,llama.cpp支持多后端,一键跑GGUF无审查模型2026-04-08CSDN在llama.cpp中为高通Adreno GPU引入全新的OpenCLTM GPU后端2024-12-11品玩研究完llama.cpp,我发现手机跑大模型竟这么简单2023-08-17智源社区Llama 2本地运行指南和工具Ollama,已4k星2023-08-03QQ News3w+星标项目大佬创业:树莓派就可运行大模型,获GitHub前CEO投资2023-06-25
News & coverage (20)
Hacker NewsGgml.ai joins Hugging Face to ensure the long-term progress of Local AI▲ 839 · 223 comments · 2026-02-20Hacker NewsVision Now Available in Llama.cpp▲ 550 · 104 comments · 2025-05-10Hacker NewsMistral Integration Improved in Llama.cpp▲ 95 · 15 comments · 2025-08-11Hacker NewsLlama.cpp: Add GPT-OSS▲ 35 · 0 comments · 2025-08-05Hacker NewsLLama.cpp Got Screwd▲ 11 · 5 comments · 2026-07-09Hacker NewsTell HN: Llamacpp now supports unified system RAM offloading on Linux▲ 6 · 0 comments · 2026-03-24Hacker NewsYet another reminder why you should not use Ollama▲ 6 · 5 comments · 2026-02-05Hacker NewsIs GitHub Releases Down?▲ 5 · 3 comments · 2025-06-17noteWhat's easier in llama.cpp v0.8.0? Finding models, long conversations, and things to watch out for after upgrading2026-10-29xBuild llama.cpp with DFlash 2 support (PR #27342): git clone2026-08-25