Felipe97/llama-cpp-compiled
01.1k
1# llama.cpp2 34 5<div align="center">6 7<b>LLM inference in C/C++</b>8 9[](https://opensource.org/licenses/MIT)10[](https://github.com/ggml-org/llama.cpp/releases?q=tag:v0)11[](https://github.com/ggml-org/llama.cpp/releases?q=b)12[](https://github.com/ggml-org/llama.cpp/actions/workflows/server.yml)13[](https://github.com/ggml-org/llama.cpp/actions/workflows/docker.yml)14[](https://github.com/ggml-org/llama.cpp/actions/workflows/winget.yml)15 16[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%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%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%3Aallozaur%20OR%20author%3Ayomaytk%20OR%20author%3Aaendk%20OR%20author%3Awine99%20OR%20author%3Agaugarg-nv%20OR%20author%3Ataronaeo%20OR%20author%3Aforforever73%20OR%20author%3Alhez%20OR%20author%3Anetrunnereve%20OR%20author%3Afairydreaming)%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)17 18</div>19 20## Quick start21 22A few options to get `llama.cpp` installed on your machine:23 24- Visit https://llama.app and follow the instructions25- Run with Docker - see our [Docker documentation](docs/docker.md)26- Download pre-built binaries from the [releases page](https://github.com/ggml-org/llama.cpp/releases)27- Build from source by cloning this repository - check out [our build guide](docs/build.md)28 29Once installed:30 31```sh32# Download and run a model directly from Hugging Face33llama cli -hf ggml-org/Qwen3.5-0.8B-GGUF34 35# Launch OpenAI-compatible API server36llama serve -hf ggml-org/Qwen3.5-0.8B-GGUF37```38 39<table align="center">40 <tr>41 <td align="center" width=50%>42 <img width="1310" height="888" alt="VLM session with `llama cli`" src="https://github.com/user-attachments/assets/88726b48-1713-48aa-a525-95a02e78afc4" />43 <i>VLM session with <b>llama cli</b></i>44 </td>45 <td align="center">46 <img width="1392" height="958" alt="Built-in web UI against `llama serve` running Qwen 3.6" src="https://github.com/user-attachments/assets/b402f972-2e32-4def-8771-8d849f08cf2e" />47 <i>Built-in web UI against <b>llama serve</b></i>48 </td>49 </tr>50<table>51 52## Description53 54The main goal of `llama.cpp` is to enable LLM (and VLM) inference with minimal setup and state-of-the-art performance on55a wide range of hardware - locally and in the cloud.56 57- Plain C/C++ implementation without any dependencies58- Apple silicon is a first-class citizen - optimized via ARM NEON, Accelerate and Metal frameworks59- AVX, AVX2, AVX512 and AMX support for x86 architectures60- RVV, ZVFH, ZFH, ZICBOP and ZIHINTPAUSE support for RISC-V architectures61- 1.5-bit, 2-bit, 3-bit, 4-bit, 5-bit, 6-bit, and 8-bit integer quantization for faster inference and reduced memory use62- Custom CUDA kernels for running LLMs on NVIDIA GPUs (support for AMD GPUs via HIP and Moore Threads GPUs via MUSA)63- Vulkan and SYCL backend support64- CPU+GPU hybrid inference to partially accelerate models larger than the total VRAM capacity65 66The `llama.cpp` project is build on top of the [ggml](https://github.com/ggml-org/ggml) library.67 68## Supported backends69 70| Backend | Target devices |71| --- | --- |72| [BLAS](docs/build.md#blas-build) | All |73| [BLIS](docs/backend/BLIS.md) | All |74| [CANN](docs/build.md#cann) | Ascend NPU |75| [CUDA](docs/build.md#cuda) | Nvidia GPU |76| [HIP](docs/build.md#hip) | AMD GPU |77| [Hexagon](docs/backend/snapdragon/README.md) | Snapdragon |78| [IBM zDNN](docs/backend/zDNN.md) | IBM Z & LinuxONE |79| [MUSA](docs/build.md#musa) | Moore Threads GPU |80| [Metal](docs/build.md#metal-build) | Apple Silicon |81| [OpenCL](docs/backend/OPENCL.md) | Adreno GPU |82| [OpenVINO [In Progress]](docs/backend/OPENVINO.md) | Intel CPUs, GPUs, and NPUs |83| [RPC](https://github.com/ggml-org/llama.cpp/tree/master/tools/rpc) | All |84| [SYCL](docs/backend/SYCL.md) | Intel GPU |85| [VirtGPU](docs/backend/VirtGPU.md) | VirtGPU APIR |86| [Vulkan](docs/build.md#vulkan) | GPU |87| [WebGPU](docs/build.md#webgpu) | All |88| [ZenDNN](docs/build.md#zendnn) | AMD CPU |89 90## Documentation91 92#### Tools93 94- [cli](tools/cli/README.md)95- [completion](tools/completion/README.md)96- [server](tools/server/README.md)97- [GBNF grammars](grammars/README.md)98 99#### Development100 101- [How to build](docs/build.md)102- [Running on Docker](docs/docker.md)103- [Build on Android](docs/android.md)104- [Multi-GPU usage](docs/multi-gpu.md)105- [Performance troubleshooting](docs/development/token_generation_performance_tips.md)106- [GGML tips & tricks](https://github.com/ggml-org/llama.cpp/wiki/GGML-Tips-&-Tricks)107- [XCFramework](docs/xcframework.md)108- [Completions](docs/completions.md)109- [Models](docs/models.md)110- [Release process](docs/release.md)111 112## Contributing113 114- Contributors can open PRs115- Collaborators will be invited based on contributions116- Maintainers can push to branches in the `llama.cpp` repo and merge PRs into the `master` branch117- Any help with managing issues, PRs and projects is very appreciated!118- Read the [CONTRIBUTING.md](CONTRIBUTING.md) for more information119 120## Acknowledgements121 122- [yhirose/cpp-httplib](https://github.com/yhirose/cpp-httplib) - Single-header HTTP server, used by `llama-server` - MIT license123- [nothings/stb](https://github.com/nothings/stb) - Single-header image format decoder, used by multimodal subsystem - Public domain124- [nlohmann/json](https://github.com/nlohmann/json) - Single-header JSON library, used by various tools/examples - MIT License125- [mackron/miniaudio](https://github.com/mackron/miniaudio) - Single-header audio format decoder, used by multimodal subsystem - Public domain126- [sheredom/subprocess.h](https://github.com/sheredom/subprocess.h) - Single-header process launching solution for C and C++ - Public domain127 