📦ggml-org / llama.cpp
← 返回首页
LLM inference in C/C++
⚖️ MIT#ggml🌐 llama.app📅 创建于 2023-03-10🔄 更新于 2026-11-01

📄 仓库 README

在 GitHub 查看 ↗
来自 GitHub 仓库自述文件 · 版权归原作者所有

llama.cpp

llama

LLM inference in C/C++ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![Release](https://img.shields.io/github/v/release/ggml-org/llama.cpp?filter=v*&color=brightgreen)](https://github.com/ggml-org/llama.cpp/releases?q=tag:v0) [![Nightly](https://img.shields.io/github/v/release/ggml-org/llama.cpp?label=nightly&filter=b*&color=orange)](https://github.com/ggml-org/llama.cpp/releases?q=b) [![Server](https://img.shields.io/github/actions/workflow/status/ggml-org/llama.cpp/server.yml?label=Server)](https://github.com/ggml-org/llama.cpp/actions/workflows/server.yml) [![Docker](https://img.shields.io/github/actions/workflow/status/ggml-org/llama.cpp/docker.yml?label=Docker)](https://github.com/ggml-org/llama.cpp/actions/workflows/docker.yml) [![Winget](https://img.shields.io/github/actions/workflow/status/ggml-org/llama.cpp/winget.yml?label=Winget)](https://github.com/ggml-org/llama.cpp/actions/workflows/winget.yml) [ggml](https://github.com/ggml-org/ggml) / [ops](https://github.com/ggml-org/llama.cpp/blob/master/docs/ops.md) / [maintainer PRs](https://github.com/ggml-org/llama.cpp/issues?q=is%3Apr%20is%3Aopen%20draft%3AFalse%20(author%3Asanmai%20OR%20author%3Argerganov%20OR%20author%3AKitaitiMakoto%20OR%20author%3Adanbev%20OR%20author%3Aaldehir%20OR%20author%3Amax-krasnyansky%20OR%20author%3ACISC%20OR%20author%3Aggerganov%20OR%20author%3Aam17an%20OR%20author%3Ajhen0409%20OR%20author%3Abartowski1182%20OR%20author%3Anikwen%20OR%20author%3Ahipudding%20OR%20author%3Aravi9%20OR%20author%3AServeurpersoCom%20OR%20author%3Athelittlefireman%20OR%20author%3Apwilkin%20OR%20author%3Areeselevine%20OR%20author%3Angxson%20OR%20author%3Ajeffbolznv%20OR%20author%3Amarty1885%20OR%20author%3A0cc4m%20OR%20author%3ATitaniumtown%20OR%20author%3Aangt%20OR%20author%3AIMbackK%20OR%20author%3Aarthw%20OR%20author%3AJohannesGaessler%20OR%20author%3AORippler%20OR%20author%3Aruixiang63%20OR%20author%3Axctan%20OR%20author%3AmasterFoad%20OR%20author%3Aallozaur%20OR%20author%3AAndreas-Krebbel%20OR%20author%3Ayomaytk%20OR%20author%3Aaendk%20OR%20author%3Awine99%20OR%20author%3Agaugarg-nv%20OR%20author%3Ataronaeo%20OR%20author%3Aforforever73%20OR%20author%3Achaxu01%20OR%20author%3Alhez%20OR%20author%3AAlekseiNikiforovIBM%20OR%20author%3Anetrunnereve%20OR%20author%3Afairydreaming%20OR%20author%3Aynankani)%20sort%3Aupdated-desc) / [dev stats](https://github.com/ggml-org/llama.cpp-dev) / [lib llama API](https://github.com/ggml-org/llama.cpp/issues/9289) / [llama-server REST API](https://github.com/ggml-org/llama.cpp/issues/9291)

Quick start

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

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

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

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
## 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](https://github.com/ggml-org/ggml) library. ## Supported backends | Backend | Target devices | | --- | --- | | [BLAS](https://github.com/ggml-org/llama.cpp/blob/HEAD/docs/build.md#blas-build) | All | | [BLIS](https://github.com/ggml-org/llama.cpp/blob/HEAD/docs/backend/BLIS.md) | All | | [CANN](https://github.com/ggml-org/llama.cpp/blob/HEAD/docs/build.md#cann) | Ascend NPU | | [CUDA](https://github.com/ggml-org/llama.cpp/blob/HEAD/docs/build.md#cuda) | Nvidia GPU | | [HIP](https://github.com/ggml-org/llama.cpp/blob/HEAD/docs/build.md#hip) | AMD GPU | | [Hexagon](https://github.com/ggml-org/llama.cpp/blob/HEAD/docs/backend/snapdragon/README.md) | Snapdragon | | [IBM zDNN](https://github.com/ggml-org/llama.cpp/blob/HEAD/docs/backend/zDNN.md) | IBM Z & LinuxONE | | [MUSA](https://github.com/ggml-org/llama.cpp/blob/HEAD/docs/build.md#musa) | Moore Threads GPU | | [Metal](https://github.com/ggml-org/llama.cpp/blob/HEAD/docs/build.md#metal-build) | Apple Silicon | | [OpenCL](https://github.com/ggml-org/llama.cpp/blob/HEAD/docs/backend/OPENCL.md) | Adreno GPU | | [OpenVINO [In Progress]](docs/backend/OPENVINO.md) | Intel CPUs, GPUs, and NPUs | | [RPC](https://github.com/ggml-org/llama.cpp/tree/master/tools/rpc) | All | | [SYCL](https://github.com/ggml-org/llama.cpp/blob/HEAD/docs/backend/SYCL.md) | Intel GPU | | [VirtGPU](https://github.com/ggml-org/llama.cpp/blob/HEAD/docs/backend/VirtGPU.md) | VirtGPU APIR | | [Vulkan](https://github.com/ggml-org/llama.cpp/blob/HEAD/docs/build.md#vulkan) | GPU | | [WebGPU](https://github.com/ggml-org/llama.cpp/blob/HEAD/docs/build.md#webgpu) | All | | [ZenDNN](https://github.com/ggml-org/llama.cpp/blob/HEAD/docs/build.md#zendnn) | AMD CPU | ## Documentation #### Tools - [cli](https://github.com/ggml-org/llama.cpp/blob/HEAD/tools/cli/README.md) - [completion](https://github.com/ggml-org/llama.cpp/blob/HEAD/tools/completion/README.md) - [server](https://github.com/ggml-org/llama.cpp/blob/HEAD/tools/server/README.md) - [GBNF grammars](https://github.com/ggml-org/llama.cpp/blob/HEAD/grammars/README.md) #### Development - [How to build](https://github.com/ggml-org/llama.cpp/blob/HEAD/docs/build.md) - [Running on Docker](https://github.com/ggml-org/llama.cpp/blob/HEAD/docs/docker.md) - [Build on Android](https://github.com/ggml-org/llama.cpp/blob/HEAD/docs/android.md) - [Multi-GPU usage](https://github.com/ggml-org/llama.cpp/blob/HEAD/docs/multi-gpu.md) - [Performance troubleshooting](https://github.com/ggml-org/llama.cpp/blob/HEAD/docs/development/token_generation_performance_tips.md) - [GGML tips & tricks](https://github.com/ggml-org/llama.cpp/wiki/GGML-Tips-&-Tricks) - [XCFramework](https://github.com/ggml-org/llama.cpp/blob/HEAD/docs/xcframework.md) - [Completions](https://github.com/ggml-org/llama.cpp/blob/HEAD/docs/completions.md) - [Models](https://github.com/ggml-org/llama.cpp/blob/HEAD/docs/models.md) - [Release process](https://github.com/ggml-org/llama.cpp/blob/HEAD/docs/release.md) ## 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](https://github.com/ggml-org/llama.cpp/blob/HEAD/CONTRIBUTING.md) for more information ## Acknowledgements - [yhirose/cpp-httplib](https://github.com/yhirose/cpp-httplib) - Single-header HTTP server, used by `llama-server` - MIT license - [nothings/stb](https://github.com/nothings/stb) - Single-header image format decoder, used by multimodal subsystem - Public domain - [nlohmann/json](https://github.com/nlohmann/json) - Single-header JSON library, used by various tools/examples - MIT License - [mackron/miniaudio](https://github.com/mackron/miniaudio) - Single-header audio format decoder, used by multimodal subsystem - Public domain - [sheredom/subprocess.h](https://github.com/sheredom/subprocess.h) - Single-header process launching solution for C and C++ - Public domain
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

📈 近 7 天 Star 趋势

每日新增 Star(柱)与累计 Star(线)· 数据来自 GitHub

🏆 排名变化趋势

在各榜单中的排名历史(数字越小越靠前)

📋 历史上榜记录

每次快照的详细数据
日期 榜单 排名 周期新增 总 STAR