llama-cpp
LLM inference in C/C++
llama.cpp is an inference engine for large language models written in plain C/C++, with no external runtime dependencies. It loads quantized models in the GGUF format and runs them on CPU, or with optional acceleration through CUDA, ROCm/HIP, Vulkan or OpenCL backends. The package provides llama-cli (interactive and one-shot inference), llama-server (an HTTP server exposing an OpenAI-compatible API, optionally with an embedded WebUI), llama-quantize, llama-bench and the ggml libraries used by many downstream projects. Models are not shipped with this package and must be downloaded separately, typically from Hugging Face. The CPU backend is tuned through the architecture's CPU_FLAGS: on x86 through CPU_FLAGS_X86, where the AVX-512 and AMX flags supported by the host processor have a large impact on inference throughput, and on ARM through CPU_FLAGS_ARM, which ggml gates at compile time via an accumulated -march string rather than per-feature build options. Note that ebuild is ported from the gentoo-zh overlay (sci-ml/llama-cpp).
homepage ↗ github: ggml-org/llama.cpp
Available in
| Overlay | Newest | Ebuilds | Last activity | |
|---|---|---|---|---|
| gentoo-zh GitHub ↗ | 0_pre10054 | 2 | 13 h | details › |
| bentoo GitHub ↗ | 0_pre10153 | 4 | 20 h | details › |
| phackerlay GitLab ↗ | 0.6644 | 1 | 2 d | details › |
| gentooplusplus GitHub ↗ | 0.6335 | 2 | 5 d | details › |
| zGentoo repo ↗ | 9608 | 2 | 6 d | details › |
Versions & arches
| Version | Overlay | amd64 | arm64 | x86 | riscv | arm | arm64-macos | loong | x64-macos | x86-macos | Committed | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 9999 LIVE ≈ | gentoo-zh | follows upstream — no keywords | 11 d | view · download · history ↗ | ||||||||
| 9999 LIVE ≈ | gentooplusplus | follows upstream — no keywords | 10 mo | view · download · history ↗ | ||||||||
| 9608 ≈ | zGentoo | amd64 testing | arm64 untested | x86 untested | riscv untested | arm untested | arm64-macos untested | loong untested | x64-macos untested | x86-macos untested | 24 d | view · download |
| 9490 ≈ | zGentoo | amd64 testing | arm64 untested | x86 untested | riscv untested | arm untested | arm64-macos untested | loong untested | x64-macos untested | x86-macos untested | 24 d | view · download |
| 0.6644 ≈ | phackerlay | amd64 testing | arm64 untested | x86 untested | riscv untested | arm untested | arm64-macos untested | loong untested | x64-macos untested | x86-macos untested | 8 mo | view · download · history ↗ |
| 0.6335 ≈ | gentooplusplus | amd64 testing | arm64 testing | x86 testing | riscv testing | arm testing | arm64-macos testing | loong testing | x64-macos testing | x86-macos testing | 10 mo | view · download · history ↗ |
| 0_pre10153 | bentoo | amd64 testing | arm64 testing | x86 untested | riscv untested | arm untested | arm64-macos untested | loong untested | x64-macos untested | x86-macos untested | 21 h | view · download · history ↗ |
| 0_pre10085 | bentoo | amd64 testing | arm64 untested | x86 untested | riscv untested | arm untested | arm64-macos untested | loong untested | x64-macos untested | x86-macos untested | 6 d | view · download · history ↗ |
| 0_pre10057 | bentoo | amd64 testing | arm64 untested | x86 untested | riscv untested | arm untested | arm64-macos untested | loong untested | x64-macos untested | x86-macos untested | 8 d | view · download · history ↗ |
| 0_pre10054 ≈ | gentoo-zh | amd64 untested | arm64 untested | x86 untested | riscv untested | arm untested | arm64-macos untested | loong untested | x64-macos untested | x86-macos untested | 11 d | view · download · history ↗ |
| 0_pre10019 | bentoo | amd64 testing | arm64 untested | x86 untested | riscv untested | arm untested | arm64-macos untested | loong untested | x64-macos untested | x86-macos untested | 8 d | view · download · history ↗ |
Use flags of 9608
- curl Add support for client-side URL transfer library
- openblas Build an OpenBLAS backend
- +openmp Build support for the OpenMP (support parallel computing), requires >=sys-devel/gcc-4.2 built with USE="openmp"
- blis Build a BLIS backend
- rocm
- cuda Enable NVIDIA CUDA support (computation on GPU)
- opencl Build an OpenCL backend, so far only works on Adreno and Intel GPUs
- openssl
- vulkan Add support for 3D graphics and computing via the Vulkan cross-platform API
- flexiblas Build a FlexiBLAS backend
- wmma Use rocWMMA to enhance flash attention performance
- examples Install examples, usually source code
10 expansion flags (python targets, ABIs, cpu flags…)
- cpu_flags_x86_avx
- cpu_flags_x86_avx2
- cpu_flags_x86_fma3
- cpu_flags_x86_f16c
- cpu_flags_x86_bmi2
- cpu_flags_x86_avx_vnni
- cpu_flags_x86_avx512f
- cpu_flags_x86_avx512vbmi
- cpu_flags_x86_avx512_vnni
- cpu_flags_x86_avx512_bf16