Skip to main content

A library for efficient similarity search and clustering of dense vectors.

Project description

faiss-wheels 🎡

Build PyPI

Faiss Python wheel packages.

Overview

This repository provides CI scripts to build wheel packages for the faiss library.

Features

The PyPI distributed wheels include the following extentions.

Platform Arch Extensions BLAS backend
Linux x86_64 generic, avx2, avx512 OpenBLAS
Linux arm64 generic, sve OpenBLAS
macOS x86_64 generic, avx2 Accelerate framework
macOS arm64 generic Accelerate framework
Windows x86_64 generic, avx2 OpenBLAS
Windows arm64 generic OpenBLAS

Note GPU binary package is discontinued as of 1.7.3 release. Build a custom wheel to support GPU features.

Install

Install the CPU-only package by:

pip install faiss-cpu

Note that the package name is faiss-cpu.

Usage

Check the official documentation at the upstream for general usage.

Index portability

One caveat is that faiss indices built in a specific environment is not always compatible in the other environment. For example, indices built and saved in the x86_64 architecture is not always compatible in the arm64 environment. In addition, SIMD features can lead to incompatibility. Indices built in the AVX2 extension are not compatible in the generic extension. Faiss automatically detects the CPU instruction set and loads extensions. This tends to be an issue in the containerized environment where CPU features are not correctly detected due to driver issues.

If you encounter a segfault or weird argument errors, set the following environment variable to force or disable the specific SIMD extension:

export FAISS_OPT_LEVEL="generic"

Building customized wheels

The PyPI wheels do not support GPU by default. To support GPU methods or use faiss with a different build configuration, build a custom wheel. For building a wheel package, there are a few requirements.

  • BLAS: There must be a BLAS implementation available on the Linux and Windows platforms.
  • OpenMP: macOS requires libomp (available via Homebrew).
  • CUDA or ROCm: A GPU development toolkit is necessary to support GPU features.

See scripts/install_* scripts for details.

Build instruction

Clone the repository with submodules.

git clone --recursive https://github.com/kyamagu/faiss-wheels.git
cd faiss-wheels

You can use a standard Python environment manager like pipx to build a wheel.

pipx run build --wheel

Any build backend supporting scikit-build-core can build wheels. For example, you can use uv to build wheels.

uv build --wheel

Build options

You can set environment variables to customize the build options. The following example builds a wheel with AVX2 and CUDA support.

export FAISS_OPT_LEVELS=avx2
export FAISS_GPU_SUPPORT=CUDA
pipx run build --wheel

Alternatively, you may directly pass CMake options via the command line. See the scikit-build-core documentation for details on how to specify CMake defines.

pipx run build --wheel \
    -Ccmake.define.FAISS_OPT_LEVELS=avx2 \
    -Ccmake.define.FAISS_GPU_SUPPORT=CUDA

The following options are available for configuration.

  • FAISS_OPT_LEVELS: Optimization levels. You may set a semicolon-separated list of values from <generic|avx2|avx512|avx512_spr|sve>. For example, setting generic,avx2 will include both generic and avx2 binary extensions in the resulting wheel. This option offers more flexibility than the upstream config variable FAISS_OPT_LEVEL, which cannot specify arbitrary combinations.
  • FAISS_GPU_SUPPORT: GPU support. You may set a value from <OFF|CUDA|CUVS|ROCM>. For example, setting CUDA will enable CUDA support. For CUDA, you will need the CUDA toolkit installed on the system. For ROCm, you will need the ROCm.
  • FAISS_ENABLE_MKL: Intel MKL support. Default is OFF. Setting FAISS_ENABLE_MKL=ON links Intel oneAPI Math Kernel Library on Linux. You will need to install Intel oneAPI MKL before building a wheel. When OFF, the system needs a BLAS backend that CMake can find, such as OpenBLAS.
  • FAISS_USE_LTO: Enable link time optimization. Default is ON. Set FAISS_USE_LTO=OFF to disable.

See also the list of supported build-time options in the upstream documentation. Do not directly set FAISS_OPT_LEVEL and FAISS_ENABLE_GPU when building a wheel via this project, as that will confuse the build process.

You might want to overwrite the default wheel package name faiss-cpu depending on the build option. Manually rewrite the name field in pyproject.toml file, or launch the following script to update the project name in pyproject.toml.

./scripts/rename_project.sh faiss-gpu

Development

This repository is intended to support PyPI distribution for the official faiss library. The repository contains the CI workflow based on cibuildwheel. Feel free to make a pull request to fix packaging problems.

Currently, GPU wheels result in a large binary size that exceeds the file size limit of PyPI.

Other relevant resources:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

faiss_cpu-1.13.2-cp314-cp314-win_arm64.whl (8.6 MB view details)

Uploaded CPython 3.14Windows ARM64

faiss_cpu-1.13.2-cp314-cp314-win_amd64.whl (18.9 MB view details)

Uploaded CPython 3.14Windows x86-64

faiss_cpu-1.13.2-cp313-cp313-win_arm64.whl (8.6 MB view details)

Uploaded CPython 3.13Windows ARM64

faiss_cpu-1.13.2-cp313-cp313-win_amd64.whl (18.9 MB view details)

Uploaded CPython 3.13Windows x86-64

faiss_cpu-1.13.2-cp312-cp312-win_arm64.whl (8.6 MB view details)

Uploaded CPython 3.12Windows ARM64

faiss_cpu-1.13.2-cp312-cp312-win_amd64.whl (18.9 MB view details)

Uploaded CPython 3.12Windows x86-64

faiss_cpu-1.13.2-cp311-cp311-win_arm64.whl (8.5 MB view details)

Uploaded CPython 3.11Windows ARM64

faiss_cpu-1.13.2-cp311-cp311-win_amd64.whl (18.9 MB view details)

Uploaded CPython 3.11Windows x86-64

faiss_cpu-1.13.2-cp310-cp310-win_amd64.whl (18.9 MB view details)

Uploaded CPython 3.10Windows x86-64

faiss_cpu-1.13.2-cp310-abi3-musllinux_1_2_x86_64.whl (25.1 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

faiss_cpu-1.13.2-cp310-abi3-musllinux_1_2_aarch64.whl (13.5 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

faiss_cpu-1.13.2-cp310-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (23.8 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

faiss_cpu-1.13.2-cp310-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (11.5 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

faiss_cpu-1.13.2-cp310-abi3-macosx_14_0_x86_64.whl (7.9 MB view details)

Uploaded CPython 3.10+macOS 14.0+ x86-64

faiss_cpu-1.13.2-cp310-abi3-macosx_14_0_arm64.whl (3.5 MB view details)

Uploaded CPython 3.10+macOS 14.0+ ARM64

File details

Details for the file faiss_cpu-1.13.2-cp314-cp314-win_arm64.whl.

File metadata

  • Download URL: faiss_cpu-1.13.2-cp314-cp314-win_arm64.whl
  • Upload date:
  • Size: 8.6 MB
  • Tags: CPython 3.14, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for faiss_cpu-1.13.2-cp314-cp314-win_arm64.whl
Algorithm Hash digest
SHA256 8113a2a80b59fe5653cf66f5c0f18be0a691825601a52a614c30beb1fca9bc7c
MD5 60e2185e0d850cf70a36d1bdf789343a
BLAKE2b-256 066f5eaf3e249c636e616ebb52e369a4a2f1d32b1caf9a611b4f917b3dd21423

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.2-cp314-cp314-win_arm64.whl:

Publisher: build.yml on faiss-wheels/faiss-wheels

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file faiss_cpu-1.13.2-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: faiss_cpu-1.13.2-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 18.9 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for faiss_cpu-1.13.2-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 c8b645e7d56591aa35dc75415bb53a62e4a494dba010e16f4b67daeffd830bd7
MD5 655db1e07e850673c8da41666065ecc9
BLAKE2b-256 b0b1daaab8046f56c60079648bd83774f61b283b59a9930a2f60790ee4cdedfe

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.2-cp314-cp314-win_amd64.whl:

Publisher: build.yml on faiss-wheels/faiss-wheels

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file faiss_cpu-1.13.2-cp313-cp313-win_arm64.whl.

File metadata

  • Download URL: faiss_cpu-1.13.2-cp313-cp313-win_arm64.whl
  • Upload date:
  • Size: 8.6 MB
  • Tags: CPython 3.13, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for faiss_cpu-1.13.2-cp313-cp313-win_arm64.whl
Algorithm Hash digest
SHA256 1243967eeb2298791ff7f3683a4abd2100d7e6ec7542ca05c3b75d47a7f621e5
MD5 ace606bdda3b14305ee752c4388763c4
BLAKE2b-256 b2525d10642da628f63544aab27e48416be4a7ea25c6b81d8bd65016d8538b00

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.2-cp313-cp313-win_arm64.whl:

Publisher: build.yml on faiss-wheels/faiss-wheels

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file faiss_cpu-1.13.2-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: faiss_cpu-1.13.2-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 18.9 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for faiss_cpu-1.13.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 cb4b5ee184816a4b099162ac93c0d7f0033d81a88e7c1291d0a9cc41ec348984
MD5 cd65a8b08ef7b823d2f9f59e0341192d
BLAKE2b-256 604b903d85bf3a8264d49964ec799e45c7ffc91098606b8bc9ef2c904c1a56cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.2-cp313-cp313-win_amd64.whl:

Publisher: build.yml on faiss-wheels/faiss-wheels

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file faiss_cpu-1.13.2-cp312-cp312-win_arm64.whl.

File metadata

  • Download URL: faiss_cpu-1.13.2-cp312-cp312-win_arm64.whl
  • Upload date:
  • Size: 8.6 MB
  • Tags: CPython 3.12, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for faiss_cpu-1.13.2-cp312-cp312-win_arm64.whl
Algorithm Hash digest
SHA256 2c4f696ae76e7c97cbc12311db83aaf1e7f4f7be06a3ffea7e5b0e8ec1fd805b
MD5 2ba59186d30a708b45dd2dd7ccf74fa2
BLAKE2b-256 c53abbdf5deaf6feb34b46b469c0a0acd40216c3d3c6ecf5aeb71d56b8a650e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.2-cp312-cp312-win_arm64.whl:

Publisher: build.yml on faiss-wheels/faiss-wheels

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file faiss_cpu-1.13.2-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: faiss_cpu-1.13.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 18.9 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for faiss_cpu-1.13.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b82c01d30430dd7b1fa442001b9099735d1a82f6bb72033acdc9206d5ac66a64
MD5 baf484866d60221aac4f88a1949baf9a
BLAKE2b-256 87ff35ed875423200c17bdd594ce921abfc1812ddd21e09355290b9a94e170ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.2-cp312-cp312-win_amd64.whl:

Publisher: build.yml on faiss-wheels/faiss-wheels

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file faiss_cpu-1.13.2-cp311-cp311-win_arm64.whl.

File metadata

  • Download URL: faiss_cpu-1.13.2-cp311-cp311-win_arm64.whl
  • Upload date:
  • Size: 8.5 MB
  • Tags: CPython 3.11, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for faiss_cpu-1.13.2-cp311-cp311-win_arm64.whl
Algorithm Hash digest
SHA256 19508a1badfb36e456c1c8664eeb948349f604db5c7545f277a0126b4a84b080
MD5 f754e448de2b95e4f362261c6d09d97c
BLAKE2b-256 9ff9b97eadbdd9e00f945d1566c7101382344f504596bfb19219465b0fc61e6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.2-cp311-cp311-win_arm64.whl:

Publisher: build.yml on faiss-wheels/faiss-wheels

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file faiss_cpu-1.13.2-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: faiss_cpu-1.13.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 18.9 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for faiss_cpu-1.13.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7c5944d7807d58fe7244b6aba06be710ee7ed99343365ed92699349efe979f51
MD5 bf700123cc7df41667c3549237a777f4
BLAKE2b-256 146d40439a05e4e60a0e889aa68b08ec70f5c8e32901f75f2be25c593a2e050e

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.2-cp311-cp311-win_amd64.whl:

Publisher: build.yml on faiss-wheels/faiss-wheels

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file faiss_cpu-1.13.2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: faiss_cpu-1.13.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 18.9 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for faiss_cpu-1.13.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 eb8bf5dd96465d043c22195afbe8276d5197b710704290d9b454144a0ad892ed
MD5 430388db31a097af2d0d9ab6eedcd817
BLAKE2b-256 be3ac215083d883173871f9b76719ca7696d832fc5255fb82358b0b25dd1d1af

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.2-cp310-cp310-win_amd64.whl:

Publisher: build.yml on faiss-wheels/faiss-wheels

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file faiss_cpu-1.13.2-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.13.2-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 8b32eb4065bac352b52a9f5ae07223567fab0a976c7d05017c01c45a1c24264f
MD5 620b654892ce4601de90c632bb818b78
BLAKE2b-256 f76b12bb4037921c38bb2c0b4cfc213ca7e04bbbebbfea89b0b5746248ce446e

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.2-cp310-abi3-musllinux_1_2_x86_64.whl:

Publisher: build.yml on faiss-wheels/faiss-wheels

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file faiss_cpu-1.13.2-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.13.2-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 85511129b34f890d19c98b82a0cd5ffb27d89d1cec2ee41d2621ee9f9ef8cf3f
MD5 2b1e6cdd1ca654c683ec4e6874940c6c
BLAKE2b-256 9c7b49dcaf354834ec457e85ca769d50bc9b5f3003fab7c94a9dcf08cf742793

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.2-cp310-abi3-musllinux_1_2_aarch64.whl:

Publisher: build.yml on faiss-wheels/faiss-wheels

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file faiss_cpu-1.13.2-cp310-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.13.2-cp310-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ab88ee287c25a119213153d033f7dd64c3ccec466ace267395872f554b648cd7
MD5 e0fba6c0aac592d2c95c5030a3cf90f6
BLAKE2b-256 e7e1a5acac02aa593809f0123539afe7b4aff61d1db149e7093239888c9053e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.2-cp310-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build.yml on faiss-wheels/faiss-wheels

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file faiss_cpu-1.13.2-cp310-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.13.2-cp310-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0ee330a284042c2480f2e90450a10378fd95655d62220159b1408f59ee83ebf1
MD5 abdee9f4a3caf3469aa97ece293b1419
BLAKE2b-256 0bd00940575f059591ca31b63a881058adb16a387020af1709dcb7669460115c

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.2-cp310-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:

Publisher: build.yml on faiss-wheels/faiss-wheels

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file faiss_cpu-1.13.2-cp310-abi3-macosx_14_0_x86_64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.13.2-cp310-abi3-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 c8d097884521e1ecaea6467aeebbf1aa56ee4a36350b48b2ca6b39366565c317
MD5 c8f36bff29373b7f3212a1d0519a732c
BLAKE2b-256 5a4a97150aa1582fb9c2bca95bd8fc37f27d3b470acec6f0a6833844b21e4b40

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.2-cp310-abi3-macosx_14_0_x86_64.whl:

Publisher: build.yml on faiss-wheels/faiss-wheels

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file faiss_cpu-1.13.2-cp310-abi3-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.13.2-cp310-abi3-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 a9064eb34f8f64438dd5b95c8f03a780b1a3f0b99c46eeacb1f0b5d15fc02dc1
MD5 0b5d889dfd19e17347372b45bf626261
BLAKE2b-256 07c9671f66f6b31ec48e5825d36435f0cb91189fa8bb6b50724029dbff4ca83c

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.2-cp310-abi3-macosx_14_0_arm64.whl:

Publisher: build.yml on faiss-wheels/faiss-wheels

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page