GPU-enabled FAISS wheels published to PyPI, maintained by Taylor Geospatial.
pip install faiss-cuda # CUDA 13.x (default — driver R580+)
pip install faiss-cuda-cu128 # CUDA 12.8 (driver R570+)No system CUDA toolkit required. The CUDA runtime libraries are pulled from PyPI
at install time (nvidia-cuda-runtime, nvidia-cublas for the default CUDA 13
package — NVIDIA dropped the -cuXX suffix at CUDA 13; *-cu12 for
faiss-cuda-cu128) and preloaded by a small loader shipped
in the wheel. Your only host prerequisite is a recent NVIDIA driver.
faissPython package, GPU-enabled, built against FAISS upstream v1.14.1.- Default (
faiss-cuda, CUDA 13) built for arch80;86;89;90;100— A100, A10/A30, RTX-40, H100/H200, Blackwell B100/B200. faiss-cuda-cu128(CUDA 12.8) built for75;80;86;89;90(Blackwell needs cu13).manylinux_2_28_x86_64, CPython 3.11–3.14. libstdc++ is statically linked so no GCC 11+ runtime is required on the host — works on RHEL 8 / glibc 2.28 out of the box.- CUDA libs (
libcudart,libcublas,libcublasLt) are excluded from the wheel — they install transitively from PyPI asnvidia-*packages, which keeps the wheel small and avoids ABI clashes if you also have PyTorch installed.
import faiss, numpy as np
res = faiss.StandardGpuResources()
xb = np.random.random((10000, 64)).astype("float32")
xq = np.random.random((5, 64)).astype("float32")
index = faiss.GpuIndexFlatL2(res, 64)
index.add(xb)
D, I = index.search(xq, 4)
print("GPU OK", I.shape)| Package | CUDA | Driver | sm archs |
|---|---|---|---|
faiss-cuda |
13.0 | R580+ | 80, 86, 89, 90, 100 |
faiss-cuda-cu128 |
12.8 | R570+ | 80, 86, 89, 90 |
To pin the runtime CUDA libs to the same minor as the build (reproducibility):
pip install 'faiss-cuda[fix-cuda]'Wheels are built natively on TGI RAILS (no container). The build script
provisions CUDA toolkit via pip (nvidia-cuda-nvcc-cuXX), uses system gcc +
openblas via modules, and runs auditwheel repair to certify the result as
manylinux_2_28_x86_64. ccache persists builds across SLURM jobs.
Prereqs on the build host: NVIDIA GPU node with CUDA driver, RHEL 8 / glibc
2.28 baseline, gcc 11+, uv, openblas-devel.
sbatch --account=<PROJECT> scripts/rails.sbatch # builds both cuda12 and cuda13
ls wheelhouse/Or directly on a node:
scripts/rails_build.sh cuda12 # one package
scripts/rails_build.sh # both- Build wheels on RAILS:
sbatch scripts/rails.sbatch(~30 min cold, ~5 min cached). - Tag and create a GitHub release, attaching every
.whlfromwheelhouse/:gh release create v1.14.1.post0 wheelhouse/*.whl --notes "..."
- The
release.ymlworkflow fires onrelease: published, downloads the wheel assets, and runsuv publishwith OIDC trusted publishing into thepypienvironment. Bothfaiss-cudaandfaiss-cuda-cu128need trusted-publisher configs on PyPI pointing atrelease.yml+ environmentpypi.
Package version follows upstream FAISS: <faiss_version>.postN (e.g. FAISS
1.14.1 → 1.14.1.post0). Bump postN on packaging-only changes. The faiss/
git submodule is the source of truth for the upstream version.
MIT. See LICENSE.
The wheels redistribute compiled binaries built from FAISS (Meta, MIT-licensed); the LICENSE file includes Meta's copyright and license text alongside ours.