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.1-cp314-cp314-win_arm64.whl (8.5 MB view details)

Uploaded CPython 3.14Windows ARM64

faiss_cpu-1.13.1-cp314-cp314-win_amd64.whl (18.8 MB view details)

Uploaded CPython 3.14Windows x86-64

faiss_cpu-1.13.1-cp313-cp313-win_arm64.whl (8.5 MB view details)

Uploaded CPython 3.13Windows ARM64

faiss_cpu-1.13.1-cp313-cp313-win_amd64.whl (18.8 MB view details)

Uploaded CPython 3.13Windows x86-64

faiss_cpu-1.13.1-cp312-cp312-win_arm64.whl (8.5 MB view details)

Uploaded CPython 3.12Windows ARM64

faiss_cpu-1.13.1-cp312-cp312-win_amd64.whl (18.8 MB view details)

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.11Windows ARM64

faiss_cpu-1.13.1-cp311-cp311-win_amd64.whl (18.8 MB view details)

Uploaded CPython 3.11Windows x86-64

faiss_cpu-1.13.1-cp310-cp310-win_amd64.whl (18.8 MB view details)

Uploaded CPython 3.10Windows x86-64

faiss_cpu-1.13.1-cp310-abi3-musllinux_1_2_x86_64.whl (25.0 MB view details)

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

faiss_cpu-1.13.1-cp310-abi3-musllinux_1_2_aarch64.whl (13.4 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

faiss_cpu-1.13.1-cp310-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (23.7 MB view details)

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

faiss_cpu-1.13.1-cp310-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (11.4 MB view details)

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

faiss_cpu-1.13.1-cp310-abi3-macosx_14_0_x86_64.whl (7.8 MB view details)

Uploaded CPython 3.10+macOS 14.0+ x86-64

faiss_cpu-1.13.1-cp310-abi3-macosx_14_0_arm64.whl (3.4 MB view details)

Uploaded CPython 3.10+macOS 14.0+ ARM64

File details

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

File metadata

  • Download URL: faiss_cpu-1.13.1-cp314-cp314-win_arm64.whl
  • Upload date:
  • Size: 8.5 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.1-cp314-cp314-win_arm64.whl
Algorithm Hash digest
SHA256 ffc58173e24026ee4dc08c50dd3506ad553d4b2103892500b0d4ae9344027d57
MD5 e5313c0fef26c5334aea5af8dfab411b
BLAKE2b-256 6153042f863a6a1202af8eec94604dc8b192319253faabb8ee6070297a24c091

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.1-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.1-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: faiss_cpu-1.13.1-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 18.8 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.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 5195ab9149c563cafe4da8ab4cc0b84b177cbb1f8aa897a8c199e11ef4f37e16
MD5 57aac2aa8524fcbdea992e650a28cf20
BLAKE2b-256 456fadf064c644a80c0ebd499144ccbab672c9946361132617ceafcc48819771

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.1-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.1-cp313-cp313-win_arm64.whl.

File metadata

  • Download URL: faiss_cpu-1.13.1-cp313-cp313-win_arm64.whl
  • Upload date:
  • Size: 8.5 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.1-cp313-cp313-win_arm64.whl
Algorithm Hash digest
SHA256 24cb2d6ce2459c94e15a6cecfed15ff8d9f997aed7bae4037c0f045022030cb3
MD5 13369684eefe9d9518afec17d57154af
BLAKE2b-256 002cc13c816546ffc5b0b7f8ca64811b24b17d73ff6382464f1ab0eed87b7753

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.1-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.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: faiss_cpu-1.13.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 18.8 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.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5f71c8840794c39c1e1cdd92c2ef4d3f77b3e650f614f296e31c2545ad2bab51
MD5 b1bc947537c837478eb9782389cd0b58
BLAKE2b-256 aa750fb845be2e674531ce7f89207d7f932ffbc8fc50f866dba5569512305cc9

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.1-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.1-cp312-cp312-win_arm64.whl.

File metadata

  • Download URL: faiss_cpu-1.13.1-cp312-cp312-win_arm64.whl
  • Upload date:
  • Size: 8.5 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.1-cp312-cp312-win_arm64.whl
Algorithm Hash digest
SHA256 168986e3f152a7568257c5ac50f3cf1a1aaa34fb41e1ba7259799bcb8ffe687f
MD5 a66daa945e278755016d757ddbe45113
BLAKE2b-256 47ab7b91c9cb328d960466e23cd9ca02f44d554ac5761d41262b74daa1715da1

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.1-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.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: faiss_cpu-1.13.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 18.8 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.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0fece5b63e8d014f8db4abfe0b4c9a82e6508e64f450fce700e5cb4b47041f1a
MD5 85e3b6ab8d504c3cc7a48bac9b95f668
BLAKE2b-256 09bcce942b00958ef52caca71666c06fa801fcd99dc61a9873ab067932dd3d5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.1-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.1-cp311-cp311-win_arm64.whl.

File metadata

  • Download URL: faiss_cpu-1.13.1-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.1-cp311-cp311-win_arm64.whl
Algorithm Hash digest
SHA256 9860949a70d1b25ff11ac9600aeda796db6710bf667b1f5508b44a63e6170b30
MD5 b193bbeb183d0adac004173542538f8f
BLAKE2b-256 faa1007e547cc7e8731346387a42001a06ee53394663616c84f3de247094158e

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.1-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.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: faiss_cpu-1.13.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 18.8 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.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 dbcf54daf14068b23c3d4116aa087eff6cf7cb43457c572318dfc2cbd944607a
MD5 186887a3647b7fd159a72e41289d2b9f
BLAKE2b-256 47c193983f2be41d0ab24cefd8926d1246e744671b4dc0b577ad576eb1205bfa

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.1-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.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: faiss_cpu-1.13.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 18.8 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.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 30e9c129e0beb9da699982d9068322e3808e0d0faab4652cabf2c08900ab7892
MD5 0d3bfa63f6a1ce2a54486bee11870383
BLAKE2b-256 ae51eddbd8468b27328d739128559155b3b36dc427e63355b5d3fb5c5c181198

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.1-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.1-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.13.1-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 8ad542573ad05af6c508f4cf5268ba2aad06f0c8d4e780a0eeba7fe6fd274922
MD5 24a8e2f38e753dc63a0900c79c77b9fc
BLAKE2b-256 da270c4e249fe50f87f1f038c80deebcdd28b23617bb42e3e5708b34c86fdae7

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.1-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.1-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.13.1-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 0b2f0e6cd30511b9fe320a2309389269269d3e363cc88c3a0380095a8c08ae27
MD5 39a9c6595ba0eff22bd4f845af69b38a
BLAKE2b-256 4cee01e07e4e780b0b739a3299ca8e5b4751970629b0f2c51f5ec464718e9f9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.1-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.1-cp310-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.13.1-cp310-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3de25edb0e69c1b95eeda923b2e23da01f472b2cc3f4817e63b25a56847d6ea7
MD5 2746711e706c52c6db6b18377c104908
BLAKE2b-256 38f8b8f0862ec6af8a71c6410a61baa35571161f7dba616aed696e91cb464630

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.1-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.1-cp310-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.13.1-cp310-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ff5bdbf392081659e6b0f98f03b602bf08d1b5a790e28aa1185ae925decff6b2
MD5 e5c840da142d90419c2d453ed19fbe0c
BLAKE2b-256 17ae40f66b640664af319ff8be87a9b0cc2c9ec025a2cf82b27cc27964fcf3c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.1-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.1-cp310-abi3-macosx_14_0_x86_64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.13.1-cp310-abi3-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 30c179891656a988f5223e586c696432aacc5f4e763d85e165be30ef57ac2bbf
MD5 a05b92472ebda26d34d64161ce5739fa
BLAKE2b-256 041f30803e63affa8bbdfd549f83ed5d39ccf900c030b6da8010d0b95f7ae1d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.1-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.1-cp310-abi3-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.13.1-cp310-abi3-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 2967def7aa2da8efbf6a5da81138780aa17a9970ca666417cb632a00a593423d
MD5 feaf5851051cf9f496b14c39f840736f
BLAKE2b-256 6692c4f30580aee11fda3f424f8509d9b5ad96b9f44409f52a7ceb6b42880e50

See more details on using hashes here.

Provenance

The following attestation bundles were made for faiss_cpu-1.13.1-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