Update README.md
Browse files
README.md
CHANGED
|
@@ -5,91 +5,224 @@ tags:
|
|
| 5 |
- llama-cpp-python
|
| 6 |
- llama.cpp
|
| 7 |
- wheels
|
|
|
|
| 8 |
- cuda
|
| 9 |
- metal
|
| 10 |
-
-
|
| 11 |
viewer: false
|
| 12 |
---
|
| 13 |
|
| 14 |
# llama-cpp-python Wheels — the complete collection
|
| 15 |
|
| 16 |
-
Prebuilt [`llama-cpp-python`](https://github.com/abetlen/llama-cpp-python) wheels,
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
2. **Thousands of additional builds that upstream never shipped** — produced here by an automated
|
| 25 |
-
GitHub Actions "wheel factory": extra CUDA versions, extra CPU instruction-set variants, and
|
| 26 |
-
extra backends (see the table below).
|
| 27 |
|
| 28 |
-
|
| 29 |
-
> **driver** installed — not the full CUDA toolkit.
|
| 30 |
|
| 31 |
-
##
|
| 32 |
|
| 33 |
-
Every wheel is a direct download.
|
| 34 |
|
| 35 |
```bash
|
| 36 |
-
pip install https://huggingface.co/datasets/AIencoder/llama-cpp-wheels/resolve/main/
|
| 37 |
```
|
| 38 |
|
| 39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
-
```bash
|
| 42 |
-
pip install https://huggingface.co/datasets/AIencoder/llama-cpp-wheels/resolve/main/llama_cpp_python-0.3.19+cu124-cp311-cp311-win_amd64.whl
|
| 43 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
```
|
| 48 |
-
llama_cpp_python-0.3.19+cu124-cp311-cp311-
|
| 49 |
-
│ │ │ │ └── platform
|
| 50 |
-
│ │ └─────┴──────── Python
|
| 51 |
-
│ └──
|
| 52 |
└── llama-cpp-python version
|
| 53 |
```
|
| 54 |
|
| 55 |
-
The
|
| 56 |
-
|
| 57 |
-
`+basic_avx2_fma_f16c`, `+openblas_avx512_fma_f16c_vnni_vbmi`, `+vulkan`, `+metal`.
|
| 58 |
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
| **Linux** (`manylinux`) | CPU (plain + AVX / AVX2 / AVX-512 up to VNNI·VBMI·BF16·AMX), OpenBLAS, MKL, CLBlast, OpenCL, Vulkan, SYCL, RPC, and **CUDA 12.4 / 12.6 / 12.8 / 12.9** | The broadest coverage — every CPU instruction-set tier so you can match your exact chip |
|
| 64 |
-
| **Windows** (`win_amd64`) | Full upstream mirror + **CUDA 12.4 / 12.6 / 12.8** | CUDA wheels self-contained (driver only) |
|
| 65 |
-
| **macOS** (`macosx`) | Metal + CPU (upstream mirror) | Apple-Silicon and Intel |
|
| 66 |
|
| 67 |
-
|
| 68 |
-
|
|
|
|
| 69 |
|
| 70 |
-
##
|
| 71 |
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
|
| 76 |
-
|
| 77 |
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
|
| 84 |
-
## Caveats
|
| 85 |
|
| 86 |
-
- **
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
|
| 92 |
---
|
| 93 |
|
| 94 |
-
*
|
| 95 |
-
[abetlen/llama-cpp-python](https://github.com/abetlen/llama-cpp-python)
|
|
|
|
|
|
| 5 |
- llama-cpp-python
|
| 6 |
- llama.cpp
|
| 7 |
- wheels
|
| 8 |
+
- prebuilt
|
| 9 |
- cuda
|
| 10 |
- metal
|
| 11 |
+
- vulkan
|
| 12 |
viewer: false
|
| 13 |
---
|
| 14 |
|
| 15 |
# llama-cpp-python Wheels — the complete collection
|
| 16 |
|
| 17 |
+
Prebuilt [`llama-cpp-python`](https://github.com/abetlen/llama-cpp-python) wheels, gathered to be the
|
| 18 |
+
single most complete place to grab one: **10,000+ wheels** covering **Linux, Windows, and macOS**,
|
| 19 |
+
every published version from `0.1.x` to `0.3.x`, Python **3.7 – 3.14**, and **every backend this
|
| 20 |
+
project can build** — from plain CPU up through AVX-512/AMX, OpenBLAS, MKL, Vulkan, OpenCL, SYCL,
|
| 21 |
+
CLBlast, Metal, and **CUDA 12.1 → 12.9**.
|
| 22 |
+
|
| 23 |
+
It combines two things:
|
| 24 |
|
| 25 |
+
1. **A full mirror of the official upstream wheels** — everything abetlen publishes (`cpu`, `metal`,
|
| 26 |
+
`cu121`–`cu124`) across every version and OS.
|
| 27 |
+
2. **Thousands of builds upstream never shipped** — produced here by an automated GitHub Actions
|
| 28 |
+
"wheel factory": newer CUDA versions (12.6 / 12.8 / 12.9), every CPU instruction-set tier, and the
|
| 29 |
+
OpenBLAS / MKL / Vulkan / OpenCL / SYCL / CLBlast / RPC backends, for the latest releases.
|
| 30 |
|
| 31 |
+
> **These are self-contained.** CUDA wheels bundle the CUDA runtime, so you only need an NVIDIA
|
| 32 |
+
> **driver** — not the full CUDA toolkit — to use them.
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
+
---
|
|
|
|
| 35 |
|
| 36 |
+
## Quick start
|
| 37 |
|
| 38 |
+
Every wheel is a direct download. Point `pip` at its URL:
|
| 39 |
|
| 40 |
```bash
|
| 41 |
+
pip install "https://huggingface.co/datasets/AIencoder/llama-cpp-wheels/resolve/main/linux/x86_64/cuda12.4/0.3.19/llama_cpp_python-0.3.19+cu124-cp311-cp311-manylinux_2_31_x86_64.whl"
|
| 42 |
```
|
| 43 |
|
| 44 |
+
Browse the folders (below) to find the one matching your OS, CPU, GPU, Python, and version.
|
| 45 |
+
|
| 46 |
+
---
|
| 47 |
+
|
| 48 |
+
## How the collection is organised
|
| 49 |
+
|
| 50 |
+
Wheels are nested **`os / arch / backend / version /`**:
|
| 51 |
|
|
|
|
|
|
|
| 52 |
```
|
| 53 |
+
linux/
|
| 54 |
+
x86_64/
|
| 55 |
+
cpu/ ← plain CPU, no special instructions (max compatibility)
|
| 56 |
+
cpu-avx2-fma-f16c/ ← CPU, AVX2 tier (most modern x86 CPUs)
|
| 57 |
+
cpu-avx512-fma-f16c-vnni-vbmi-bf16-amx/ ← newest Intel/AMD server CPUs
|
| 58 |
+
openblas-avx2-fma-f16c/
|
| 59 |
+
mkl-avx2-fma-f16c/
|
| 60 |
+
vulkan/ opencl/ clblast/ sycl/ rpc/
|
| 61 |
+
cuda12.4/ cuda12.6/ cuda12.8/ cuda12.9/
|
| 62 |
+
0.3.19/
|
| 63 |
+
llama_cpp_python-0.3.19+cu124-cp311-cp311-manylinux_2_31_x86_64.whl
|
| 64 |
+
…one per Python version…
|
| 65 |
+
aarch64/ … i686/ …
|
| 66 |
+
windows/
|
| 67 |
+
x86_64/
|
| 68 |
+
cpu/ cuda12.4/ cuda12.6/ cuda12.8/ (+ upstream-mirrored variants)
|
| 69 |
+
0.3.19/ …
|
| 70 |
+
macos/
|
| 71 |
+
arm64/ metal/ … (Apple Silicon)
|
| 72 |
+
x86_64/ metal/ … (Intel Macs)
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
**Why this order:** `os` is the hardest constraint (and a clean 3-way split at the root); `arch`
|
| 76 |
+
keeps `arm64`/`aarch64`/`i686` wheels from being mixed in with `x86_64`; `backend` is the capability
|
| 77 |
+
you actually choose; `version` sits at the leaf, which then holds just the per-Python builds for that
|
| 78 |
+
exact combination. Every leaf folder stays tiny, which also keeps the repo under HuggingFace's hard
|
| 79 |
+
limit of 10,000 files per directory.
|
| 80 |
+
|
| 81 |
+
*(Some early wheels may still sit in the repository root during migration — both are valid; use the
|
| 82 |
+
file browser or search.)*
|
| 83 |
+
|
| 84 |
+
---
|
| 85 |
+
|
| 86 |
+
## Choosing the right wheel
|
| 87 |
+
|
| 88 |
+
You need to match **four** things. Work down the folder tree:
|
| 89 |
+
|
| 90 |
+
### 1. OS + architecture
|
| 91 |
+
`linux` (manylinux/musllinux), `windows`, or `macos`; then your CPU architecture — `x86_64` (most
|
| 92 |
+
desktops/servers, incl. Windows and Intel Macs), `arm64` (Apple Silicon), or `aarch64` (ARM Linux).
|
| 93 |
+
|
| 94 |
+
### 2. Python version
|
| 95 |
+
The `cpXY` tag in the filename is your Python: `cp311` = CPython 3.11. Check with `python --version`.
|
| 96 |
+
Pick the wheel whose `cpXY` matches exactly.
|
| 97 |
+
|
| 98 |
+
### 3. Backend — the important choice
|
| 99 |
+
|
| 100 |
+
**CPU (no GPU):** pick the highest instruction tier your CPU supports. Going too high causes an
|
| 101 |
+
`Illegal instruction` crash; too low just runs slower.
|
| 102 |
+
|
| 103 |
+
| Folder | Needs | Who it's for |
|
| 104 |
+
|--------|-------|--------------|
|
| 105 |
+
| `cpu` | nothing | oldest CPUs / max compatibility / VMs |
|
| 106 |
+
| `cpu-avx` , `cpu-avx-f16c` | AVX | pre-2013 CPUs |
|
| 107 |
+
| `cpu-avx2-fma-f16c` | AVX2 | **most modern desktops/laptops** |
|
| 108 |
+
| `cpu-avx2-fma-f16c-avxvnni` | AVX2 + VNNI | Alder Lake+ consumer Intel |
|
| 109 |
+
| `cpu-avx512-fma-f16c` | AVX-512 | HEDT / server |
|
| 110 |
+
| `cpu-avx512-…-vnni-vbmi` , `…-bf16-amx` | AVX-512 VNNI/VBMI/BF16/AMX | Sapphire Rapids & newer servers |
|
| 111 |
+
|
| 112 |
+
Check your CPU: Linux `lscpu | grep -o 'avx[^ ]*'` · or `pip install py-cpuinfo && python -c "import cpuinfo,pprint; pprint.pp(cpuinfo.get_cpu_info()['flags'])"` on any OS.
|
| 113 |
+
|
| 114 |
+
**NVIDIA GPU:** use a `cudaXX.Y` folder. Run `nvidia-smi` — the top-right "CUDA Version: 12.x" is the
|
| 115 |
+
**maximum** your driver supports. Pick a folder with that minor version **or lower** (e.g. driver shows
|
| 116 |
+
12.6 → `cuda12.4` or `cuda12.6` both work; CUDA 12.x is forward-compatible within the 12 series). You
|
| 117 |
+
do **not** need the CUDA toolkit installed — only the driver — because the runtime is bundled.
|
| 118 |
|
| 119 |
+
**Apple GPU:** `metal` (Apple Silicon and Intel Macs with a Metal GPU).
|
| 120 |
+
|
| 121 |
+
**Other accelerators / BLAS:**
|
| 122 |
+
|
| 123 |
+
| Folder | What it is |
|
| 124 |
+
|--------|-----------|
|
| 125 |
+
| `openblas-*` | OpenBLAS-accelerated CPU BLAS (faster prompt processing on CPU) |
|
| 126 |
+
| `mkl-*` | Intel MKL BLAS (fastest on Intel CPUs) |
|
| 127 |
+
| `vulkan` | cross-vendor GPU (AMD / Intel / NVIDIA via Vulkan) |
|
| 128 |
+
| `opencl` / `clblast` | OpenCL GPU acceleration (incl. older/mobile GPUs) |
|
| 129 |
+
| `sycl` | Intel GPUs (oneAPI / SYCL) |
|
| 130 |
+
| `rpc` | distributed inference across machines |
|
| 131 |
+
|
| 132 |
+
### 4. Version
|
| 133 |
+
`0.3.19` is the newest release built here; older ones are kept for reproducibility. Newer is usually
|
| 134 |
+
better unless you're pinning for compatibility.
|
| 135 |
+
|
| 136 |
+
---
|
| 137 |
+
|
| 138 |
+
## Filename anatomy
|
| 139 |
|
| 140 |
```
|
| 141 |
+
llama_cpp_python-0.3.19+cu124-cp311-cp311-manylinux_2_31_x86_64.whl
|
| 142 |
+
│ │ │ │ └── platform (manylinux… / win_amd64 / macosx…)
|
| 143 |
+
│ │ └─────┴──────── Python (cp311 = CPython 3.11)
|
| 144 |
+
│ └── backend tag (+cu124, +basic_avx2_fma_f16c, +openblas_…, +vulkan; absent = base build)
|
| 145 |
└── llama-cpp-python version
|
| 146 |
```
|
| 147 |
|
| 148 |
+
The folder name normalises that backend tag into something readable (`cu124` → `cuda12.4`,
|
| 149 |
+
`basic_avx512_fma_f16c_vnni_vbmi` → `cpu-avx512-fma-f16c-vnni-vbmi`).
|
|
|
|
| 150 |
|
| 151 |
+
---
|
| 152 |
+
|
| 153 |
+
## More install examples
|
| 154 |
+
|
| 155 |
+
```bash
|
| 156 |
+
# Linux, modern CPU, no GPU (AVX2):
|
| 157 |
+
pip install "https://huggingface.co/datasets/AIencoder/llama-cpp-wheels/resolve/main/linux/x86_64/cpu-avx2-fma-f16c/0.3.19/llama_cpp_python-0.3.19+basic_avx2_fma_f16c-cp311-cp311-manylinux_2_31_x86_64.whl"
|
| 158 |
|
| 159 |
+
# Windows, NVIDIA GPU, CUDA 12.6, Python 3.11:
|
| 160 |
+
pip install "https://huggingface.co/datasets/AIencoder/llama-cpp-wheels/resolve/main/windows/x86_64/cuda12.6/0.3.19/llama_cpp_python-0.3.19+cu126-cp311-cp311-win_amd64.whl"
|
|
|
|
|
|
|
|
|
|
| 161 |
|
| 162 |
+
# macOS Apple Silicon, Metal, Python 3.12:
|
| 163 |
+
pip install "https://huggingface.co/datasets/AIencoder/llama-cpp-wheels/resolve/main/macos/arm64/metal/0.3.4/llama_cpp_python-0.3.4-cp312-cp312-macosx_11_0_arm64.whl"
|
| 164 |
+
```
|
| 165 |
|
| 166 |
+
### Programmatic download
|
| 167 |
|
| 168 |
+
```python
|
| 169 |
+
from huggingface_hub import hf_hub_download
|
| 170 |
+
path = hf_hub_download(
|
| 171 |
+
repo_id="AIencoder/llama-cpp-wheels", repo_type="dataset",
|
| 172 |
+
filename="linux/x86_64/cuda12.4/0.3.19/llama_cpp_python-0.3.19+cu124-cp311-cp311-manylinux_2_31_x86_64.whl",
|
| 173 |
+
)
|
| 174 |
+
# then: pip install <path>
|
| 175 |
+
```
|
| 176 |
|
| 177 |
+
List everything with `HfApi().list_repo_files("AIencoder/llama-cpp-wheels", repo_type="dataset")`.
|
| 178 |
|
| 179 |
+
---
|
| 180 |
+
|
| 181 |
+
## Coverage
|
| 182 |
+
|
| 183 |
+
| | Linux (`x86_64`, plus some `aarch64`/`i686`) | Windows (`x86_64`) | macOS (`arm64` + `x86_64`) |
|
| 184 |
+
|---|---|---|---|
|
| 185 |
+
| **CPU** | plain + every AVX/AVX2/AVX-512 tier up to VNNI·VBMI·BF16·AMX | upstream mirror | upstream mirror |
|
| 186 |
+
| **BLAS** | OpenBLAS, MKL (every tier) | upstream mirror | — |
|
| 187 |
+
| **GPU** | CUDA 12.4 / 12.6 / 12.8 / 12.9, Vulkan, OpenCL, CLBlast, SYCL | CUDA 12.4 / 12.6 / 12.8 | Metal |
|
| 188 |
+
| **Other** | RPC | — | — |
|
| 189 |
+
|
| 190 |
+
- **Python:** cp38 – cp314 for factory builds; the upstream mirror goes back to cp37 / PyPy on old versions.
|
| 191 |
+
- **Versions:** factory builds target 0.3.16 – 0.3.19; the mirror covers the full history (0.1.x → 0.3.x).
|
| 192 |
+
- **Totals:** 10,000+ wheels and growing. The upstream mirror targets all ~6,800 official wheels; the
|
| 193 |
+
factory adds several thousand more that upstream never produced.
|
| 194 |
+
|
| 195 |
+
---
|
| 196 |
+
|
| 197 |
+
## How these wheels are built
|
| 198 |
+
|
| 199 |
+
The non-mirror wheels are compiled automatically by a GitHub Actions "factory":
|
| 200 |
+
|
| 201 |
+
- **No GPU required to build** — `nvcc` cross-compiles the CUDA kernels on ordinary CPU runners.
|
| 202 |
+
- Built from the official `abetlen/llama-cpp-python` source at the exact tagged version.
|
| 203 |
+
- **Self-contained:** Linux wheels are `auditwheel`-repaired; Windows CUDA wheels bundle the CUDA
|
| 204 |
+
runtime DLLs (`cudart`, `cublas`, `cublasLt`) next to `llama.dll`. You need only the GPU driver.
|
| 205 |
+
- Each wheel is installed and structurally verified (dependency tree checked) before upload.
|
| 206 |
+
- The build queue is **derived** by diffing this dataset against the target matrix, so the collection
|
| 207 |
+
fills in and stays current on its own.
|
| 208 |
+
|
| 209 |
+
---
|
| 210 |
|
| 211 |
+
## Caveats & troubleshooting
|
| 212 |
|
| 213 |
+
- **`Could not find module 'llama.dll' (or one of its dependencies)` (Windows CUDA):** you don't have an
|
| 214 |
+
NVIDIA driver installed, or it's too old for the CUDA minor version you picked. Install/update the
|
| 215 |
+
driver, or drop to a lower `cudaXX.Y` folder.
|
| 216 |
+
- **`Illegal instruction` on import (CPU):** the wheel's instruction tier is higher than your CPU
|
| 217 |
+
supports. Use a lower `cpu-…` folder (when unsure, plain `cpu`).
|
| 218 |
+
- **CUDA wheels are large** (~0.6 – 1.3 GB): expected — they bundle the runtime and the fat multi-arch
|
| 219 |
+
CUDA kernels, which is exactly what lets them run without a separate CUDA install.
|
| 220 |
+
- **GPU wheels can't be import-tested without a GPU** — that's normal; the build verifies structure, not
|
| 221 |
+
a live GPU load.
|
| 222 |
+
- Community builds, provided **as-is** under the same **MIT** license as llama-cpp-python.
|
| 223 |
|
| 224 |
---
|
| 225 |
|
| 226 |
+
*Maintained by [AIencoder](https://huggingface.co/AIencoder). Wheels are builds of
|
| 227 |
+
[abetlen/llama-cpp-python](https://github.com/abetlen/llama-cpp-python); all credit for llama-cpp-python
|
| 228 |
+
and llama.cpp to their authors.*
|