Add comprehensive README with usage guide, FAQ, and wheel reference
Browse files6 unmodified lines78910111213141516171819203 unmodified lines242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072081 unmodified line2102112122132142156 unmodified lines- llama-cpp-python- wheels- prebuilt- manylinux- cpu- gpu- vulkan- openblas- mkl- avx2- avx512- gguf- inferencepretty_name: "llama-cpp-python Prebuilt Wheels"3 unmodified lines# 🏭 llama-cpp-python Prebuilt Wheels**The most complete collection of prebuilt `llama-cpp-python` wheels for manylinux.**Never compile `llama-cpp-python` from source again. Just `pip install` the exact wheel you need.## 📊 Stats| | Count ||--|-------|| **Total Wheels** | 3,795+ || **Versions** | 0.3.0 — 0.3.16 (17 versions) || **Python** | 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.14 || **CPU Backends** | OpenBLAS, Intel MKL, Basic (no BLAS) || **GPU Backends** | Vulkan, CLBlast, OpenCL, SYCL, RPC || **CPU Optimizations** | AVX, AVX2, AVX512, FMA, F16C, VNNI, VBMI, BF16, AMX, AVX-VNNI || **Platform** | `manylinux_2_31_x86_64` |## ⚡ Quick Install```bash# Direct install — just replace the filename with the wheel you needpip install https://huggingface.co/datasets/AIencoder/llama-cpp-wheels/resolve/main/WHEEL_FILENAME.whl```### Examples```bash# OpenBLAS + AVX2/FMA/F16C (most modern desktops, 2013+)pip install https://huggingface.co/datasets/AIencoder/llama-cpp-wheels/resolve/main/llama_cpp_python-0.3.16+openblas_avx2_fma_f16c-cp311-cp311-manylinux_2_31_x86_64.whl# AVX512 + VNNI + VBMI (Ice Lake servers, 2019+)pip install https://huggingface.co/datasets/AIencoder/llama-cpp-wheels/resolve/main/llama_cpp_python-0.3.16+openblas_avx512_fma_f16c_vnni_vbmi-cp311-cp311-manylinux_2_31_x86_64.whl# Vulkan GPU accelerationpip install https://huggingface.co/datasets/AIencoder/llama-cpp-wheels/resolve/main/llama_cpp_python-0.3.16+vulkan-cp311-cp311-manylinux_2_31_x86_64.whl# Basic — maximum compatibility (any x86-64 CPU)pip install https://huggingface.co/datasets/AIencoder/llama-cpp-wheels/resolve/main/llama_cpp_python-0.3.16+basic_basic-cp311-cp311-manylinux_2_31_x86_64.whl```### In a requirements.txt```# URL-encode the + as %2Bhttps://huggingface.co/datasets/AIencoder/llama-cpp-wheels/resolve/main/llama_cpp_python-0.3.16%2Bopenblas_avx2_fma_f16c-cp311-cp311-manylinux_2_31_x86_64.whl```### In a Dockerfile```dockerfileRUN pip install --no-cache-dir \https://huggingface.co/datasets/AIencoder/llama-cpp-wheels/resolve/main/llama_cpp_python-0.3.16%2Bopenblas_avx2_fma_f16c-cp311-cp311-manylinux_2_31_x86_64.whl```### In a HuggingFace Space (packages.txt + requirements.txt)**packages.txt:**```libopenblas-dev```**requirements.txt:**```https://huggingface.co/datasets/AIencoder/llama-cpp-wheels/resolve/main/llama_cpp_python-0.3.16%2Bopenblas_avx2_fma_f16c-cp311-cp311-manylinux_2_31_x86_64.whl```## 🔧 Which Wheel Do I Need?### Step 1: Choose Your Backend| Backend | Best For | Tag ||---------|----------|-----|| **OpenBLAS** | General CPU inference, good default | `openblas` || **Intel MKL** | Intel CPUs, potentially faster BLAS | `mkl` || **Basic** | Maximum compatibility, no external deps | `basic` || **Vulkan** | GPU acceleration (NVIDIA, AMD, Intel) | `vulkan` || **CLBlast** | OpenCL GPU acceleration | `clblast` || **OpenCL** | Generic OpenCL devices | `opencl` || **SYCL** | Intel GPU (Arc, Flex, Data Center) | `sycl` || **RPC** | Distributed inference over network | `rpc` |### Step 2: Choose Your CPU OptimizationCheck what your CPU supports:```bash# Linux — check CPU flagsgrep -o 'avx[a-z0-9_]*\|fma\|f16c\|sse4_2' /proc/cpuinfo | sort -u```| CPU Era | Example CPUs | Recommended Tag ||---------|-------------|-----------------|| **2013+ Desktop** | Haswell, Ryzen 1st gen | `avx2_fma_f16c` || **2017+ Server** | Skylake-X, EPYC | `avx512_fma_f16c` || **2019+ Server** | Ice Lake, EPYC 3rd gen | `avx512_fma_f16c_vnni_vbmi` || **2021+ Desktop** | Alder Lake, 12th gen Intel | `avx2_fma_f16c_avxvnni` || **2023+ Server** | Sapphire Rapids, 4th gen Xeon | `avx512_fma_f16c_vnni_vbmi_bf16_amx` || **2012+ Legacy** | Ivy Bridge | `avx_f16c` || **2011+ Legacy** | Sandy Bridge | `avx` || **Any x86-64** | Anything 64-bit | `basic` |### Step 3: Build the Filename```llama_cpp_python-{VERSION}+{BACKEND}_{CPU_TAG}-{PYTHON}-{PYTHON}-manylinux_2_31_x86_64.whl```**Example:** Python 3.12 + OpenBLAS + AVX2/FMA/F16C + version 0.3.16:```llama_cpp_python-0.3.16+openblas_avx2_fma_f16c-cp312-cp312-manylinux_2_31_x86_64.whl```GPU backends don't need a CPU tag:```llama_cpp_python-0.3.16+vulkan-cp312-cp312-manylinux_2_31_x86_64.whl```## 📋 CPU Optimization Tags Reference| Tag | CPU Instructions Enabled | CMake Flags ||-----|-------------------------|-------------|| `basic` | None (pure x86-64) | — || `avx` | AVX | `-DGGML_AVX=ON` || `avx_f16c` | AVX + F16C | `-DGGML_AVX=ON -DGGML_F16C=ON` || `avx2_fma_f16c` | AVX2 + FMA + F16C | `-DGGML_AVX2=ON -DGGML_FMA=ON -DGGML_F16C=ON` || `avx512_fma_f16c` | AVX512 + FMA + F16C | `-DGGML_AVX512=ON -DGGML_FMA=ON -DGGML_F16C=ON` || `avx512_fma_f16c_vnni_vbmi` | AVX512 + FMA + F16C + VNNI + VBMI | `+ -DGGML_AVX512_VNNI=ON -DGGML_AVX512_VBMI=ON` || `avx512_fma_f16c_vnni_vbmi_bf16_amx` | Full server (Sapphire Rapids) | `+ -DGGML_AVX512_BF16=ON -DGGML_AMX_TILE/INT8/BF16=ON` || `avx2_fma_f16c_avxvnni` | AVX2 + FMA + F16C + AVX-VNNI | `+ -DGGML_AVX_VNNI=ON` |## 🐍 Python Version Support| Python | Tag | Status ||--------|-----|--------|| 3.8 | `cp38` | ✅ Full coverage || 3.9 | `cp39` | ✅ Full coverage || 3.10 | `cp310` | ✅ Full coverage || 3.11 | `cp311` | ✅ Full coverage || 3.12 | `cp312` | ✅ Full coverage || 3.13 | `cp313` | ✅ Full coverage || 3.14 | `cp314` | ✅ Full coverage |## 📦 Naming Convention (PEP 440)All wheels follow the [PEP 440](https://peps.python.org/pep-0440/) local version identifier standard:```llama_cpp_python-{VERSION}+{LOCAL_TAG}-{PYTHON}-{ABI}-{PLATFORM}.whl^└── Local version label (backend + CPU flags)```The `+` separates the upstream version from the local build variant. The local tag uses `_` to separate components. This is fully PEP 440 compliant and works with `pip`, `requirements.txt`, and all standard Python packaging tools.## 🏭 How These Wheels Are BuiltThese wheels are built automatically by the **Ultimate Llama Wheel Factory** — a distributed build system running on HuggingFace Spaces:- **[Dispatcher](https://huggingface.co/spaces/AIencoder/wheel-factory-dispatcher)** — Command center for creating and managing build jobs- **[Workers 1-4](https://huggingface.co/spaces/AIencoder/wheel-factory-worker-1)** — Autonomous Docker-based build agents- **[Auditor](https://huggingface.co/spaces/AIencoder/wheel-factory-auditor)** — Validates filenames and repo healthEach wheel is compiled from source with explicit cmake flags — no `-march=native`, ensuring the exact instruction set advertised in the filename.## ❓ FAQ**Q: Do I need to install OpenBLAS separately?**A: For `openblas` wheels on Linux, yes: `sudo apt install libopenblas-dev`. For `basic` wheels, no external dependencies needed. For HuggingFace Spaces, add `libopenblas-dev` to `packages.txt`.**Q: Which wheel is fastest?**A: Use the most specific wheel your CPU supports. `avx2_fma_f16c` is the sweet spot for most modern hardware. If your CPU has AVX512, use the `avx512` variants for potentially better performance on large batch sizes.**Q: Can I use these on Ubuntu/Debian/Fedora/etc?**A: Yes! `manylinux_2_31` works on any Linux distro with glibc ≥ 2.31. That includes Ubuntu 20.04+, Debian 11+, Fedora 34+, RHEL 9+, and most other modern distros.**Q: What about Windows/macOS/CUDA wheels?**A: This repo currently focuses on manylinux. For other platforms, check [abetlen's wheel index](https://abetlen.github.io/llama-cpp-python/whl/) or [jllllll's cuBLAS wheels](https://github.com/jllllll/llama-cpp-python-cuBLAS-wheels).**Q: A wheel doesn't work / crashes with SIGILL?**A: You're probably using a wheel with CPU instructions your hardware doesn't support (e.g., AVX512 on a non-AVX512 CPU). Try a less specific wheel like `avx2_fma_f16c` or `basic`.## 📄 License1 unmodified line## 🙏 Credits- [Georgi Gerganov](https://github.com/ggerganov) — llama.cpp- [Andrei Betlen](https://github.com/abetlen) — llama-cpp-python- Built by [AIencoder](https://huggingface.co/AIencoder) with the Ultimate Llama Wheel Factory6 unmodified lines7891011121314153 unmodified lines1920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981991 unmodified line2012022032042052066 unmodified lines- llama-cpp-python- wheels- prebuilt- cpu- gpu- manylinux- gguf- inferencepretty_name: "llama-cpp-python Prebuilt Wheels"3 unmodified lines# 🏭 llama-cpp-python Prebuilt Wheels**The most complete collection of prebuilt `llama-cpp-python` wheels for manylinux x86_64.**Stop compiling. Start inferencing.```bashpip install https://huggingface.co/datasets/AIencoder/llama-cpp-wheels/resolve/main/llama_cpp_python-0.3.16+openblas_avx2_fma_f16c-cp311-cp311-manylinux_2_31_x86_64.whl```## 📊 What's Inside| | Count ||---|---|| **Total Wheels** | 3,794+ || **Versions** | 0.3.0 — 0.3.16 (17 versions) || **Python** | 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.14 || **Platform** | `manylinux_2_31_x86_64` || **Backends** | 8 || **CPU Profiles** | 13+ flag combinations |## ⚡ Backends| Backend | Tag | Description ||---------|-----|-------------|| **OpenBLAS** | `openblas` | CPU BLAS acceleration — best general-purpose choice || **Intel MKL** | `mkl` | Intel Math Kernel Library — fastest on Intel CPUs || **Basic** | `basic` | No BLAS — maximum compatibility, no extra dependencies || **Vulkan** | `vulkan` | Universal GPU acceleration — works on NVIDIA, AMD, Intel || **CLBlast** | `clblast` | OpenCL GPU acceleration || **SYCL** | `sycl` | Intel GPU acceleration (Data Center, Arc, iGPU) || **OpenCL** | `opencl` | Generic OpenCL GPU backend || **RPC** | `rpc` | Distributed inference over network |## 🖥️ CPU Optimization ProfilesWheels are built with specific CPU instruction sets enabled. Pick the one that matches your hardware:| CPU Tag | Instructions | Best For ||---------|-------------|----------|| `basic` | None | Any x86-64 CPU (maximum compatibility) || `avx` | AVX | Sandy Bridge+ (2011) || `avx_f16c` | AVX + F16C | Ivy Bridge+ (2012) || `avx2_fma_f16c` | AVX2 + FMA + F16C | **Haswell+ (2013) — most common** || `avx2_fma_f16c_avxvnni` | AVX2 + FMA + F16C + AVX-VNNI | Alder Lake+ (2021) || `avx512_fma_f16c` | AVX-512 + FMA + F16C | Skylake-X+ (2017) || `avx512_fma_f16c_vnni` | + AVX512-VNNI | Cascade Lake+ (2019) || `avx512_fma_f16c_vnni_vbmi` | + AVX512-VBMI | Ice Lake+ (2019) || `avx512_fma_f16c_vnni_vbmi_bf16_amx` | + BF16 + AMX | Sapphire Rapids+ (2023) |### How to Pick the Right Wheel**Don't know your CPU?** Start with `avx2_fma_f16c` — it works on any CPU from 2013 onwards (Intel Haswell, AMD Ryzen, and newer).**Want maximum compatibility?** Use `basic` — works on literally any x86-64 CPU.**Have a server CPU?** Check if it supports AVX-512:```bashgrep -o 'avx[^ ]*\|fma\|f16c\|bmi2\|sse4_2' /proc/cpuinfo | sort -u```## 📦 Filename FormatAll wheels follow the [PEP 440](https://peps.python.org/pep-0440/) local version identifier standard:```llama_cpp_python-{version}+{backend}_{cpu_flags}-{python}-{python}-{platform}.whl```Examples:```llama_cpp_python-0.3.16+openblas_avx2_fma_f16c-cp311-cp311-manylinux_2_31_x86_64.whlllama_cpp_python-0.3.16+vulkan-cp312-cp312-manylinux_2_31_x86_64.whlllama_cpp_python-0.3.16+basic-cp310-cp310-manylinux_2_31_x86_64.whl```The local version label (`+openblas_avx2_fma_f16c`) encodes:- **Backend**: `openblas`, `mkl`, `basic`, `vulkan`, `clblast`, `sycl`, `opencl`, `rpc`- **CPU flags** (in order): `avx`, `avx2`, `avx512`, `fma`, `f16c`, `vnni`, `vbmi`, `bf16`, `avxvnni`, `amx`## 🚀 Quick Start### CPU (OpenBLAS + AVX2 — recommended for most users)```bashsudo apt-get install libopenblas-devpip install https://huggingface.co/datasets/AIencoder/llama-cpp-wheels/resolve/main/llama_cpp_python-0.3.16+openblas_avx2_fma_f16c-cp311-cp311-manylinux_2_31_x86_64.whl```### GPU (Vulkan — works on any GPU vendor)```bashsudo apt-get install libvulkan1pip install https://huggingface.co/datasets/AIencoder/llama-cpp-wheels/resolve/main/llama_cpp_python-0.3.16+vulkan-cp311-cp311-manylinux_2_31_x86_64.whl```### Basic (zero dependencies)```bashpip install https://huggingface.co/datasets/AIencoder/llama-cpp-wheels/resolve/main/llama_cpp_python-0.3.16+basic-cp311-cp311-manylinux_2_31_x86_64.whl```### Example Usage```pythonfrom llama_cpp import Llamallm = Llama.from_pretrained(repo_id="Qwen/Qwen2.5-Coder-7B-Instruct-GGUF",filename="*q4_k_m.gguf",n_ctx=4096,)output = llm.create_chat_completion(messages=[{"role": "user", "content": "Write a Python hello world"}],max_tokens=256,)print(output["choices"][0]["message"]["content"])```## 🔧 Runtime Dependencies| Backend | Required Packages ||---------|------------------|| OpenBLAS | `libopenblas0` (runtime) or `libopenblas-dev` (build) || MKL | Intel oneAPI MKL || Vulkan | `libvulkan1` || CLBlast | `libclblast1` || OpenCL | `ocl-icd-libopencl1` || Basic | **None** || SYCL | Intel oneAPI DPC++ runtime || RPC | Network access to RPC server |## 🏭 How These Wheels Are BuiltThese wheels are built by the **Ultimate Llama Wheel Factory** — a distributed build system running entirely on free HuggingFace Spaces:| Component | Link ||-----------|------|| 🏭 Dispatcher | [wheel-factory-dispatcher](https://huggingface.co/spaces/AIencoder/wheel-factory-dispatcher) || ⚙️ Workers 1-4 | [wheel-factory-worker-1](https://huggingface.co/spaces/AIencoder/wheel-factory-worker-1) ... 4 || 🔍 Auditor | [wheel-factory-auditor](https://huggingface.co/spaces/AIencoder/wheel-factory-auditor) |The factory uses explicit cmake flags matching llama.cpp's official CPU variant builds:```CMAKE_ARGS="-DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS -DGGML_AVX2=ON -DGGML_FMA=ON -DGGML_F16C=ON -DGGML_AVX=OFF -DGGML_AVX512=OFF -DGGML_NATIVE=OFF"```Every flag is set explicitly (no cmake defaults) to ensure reproducible, deterministic builds.## ❓ FAQ**Q: Which wheel should I use?**For most people: `openblas_avx2_fma_f16c` with your Python version. It's fast, works on 90%+ of modern CPUs, and only needs `libopenblas`.**Q: Can I use these on Ubuntu / Debian / Fedora / Arch?**Yes — `manylinux_2_31` wheels work on any Linux distro with glibc 2.31 or newer (Ubuntu 20.04+, Debian 11+, Fedora 34+, Arch).**Q: What about Windows / macOS / CUDA wheels?**This repo focuses on manylinux x86_64. For other platforms, see:- [abetlen's official wheel index](https://abetlen.github.io/llama-cpp-python/whl/) — CPU, CUDA 12.1-12.5, Metal- [jllllll's CUDA wheels](https://github.com/jllllll/llama-cpp-python-cuBLAS-wheels) — cuBLAS + AVX combos**Q: These wheels don't work on Alpine Linux.**Alpine uses musl, not glibc. These are `manylinux` (glibc) wheels. Build from source or use `musllinux` wheels.**Q: I get "illegal instruction" errors.**You're using a wheel with CPU flags your processor doesn't support. Try `basic` (no SIMD) or check your CPU flags with:```bashgrep -o 'avx[^ ]*\|fma\|f16c' /proc/cpuinfo | sort -u```**Q: Can I contribute more wheels?**Yes! The factory source code is open. See the Dispatcher and Worker Spaces linked above.## 📄 License1 unmodified line## 🙏 Credits- [llama.cpp](https://github.com/ggml-org/llama.cpp) by Georgi Gerganov and the ggml community- [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) by Andrei Betlen- Built with 🏭 by [AIencoder](https://huggingface.co/AIencoder)
README.md+124-133