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 scripts to build wheel packages for the faiss library.

  • Builds CPU-only version with cibuildwheel.
  • Bundles OpenBLAS in Linux/Windows
  • Uses Accelerate framework in macOS

There is also a source package to customize the build process.

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

Install

Install the CPU-only binary package by:

pip install faiss-cpu

Note that the package name is faiss-cpu.

Supporting GPU or customized build configuration

The PyPI binary package does not support GPU. To support GPU methods or use faiss with different build configuration, build a source package. For building the source package, swig 3.0.12 or later needs to be available. Also, there should be all the required prerequisites for building faiss itself, such as nvcc and CUDA toolkit.

Building faiss

The source package assumes faiss is already built and installed in the system. If not done so elsewhere, build and install the faiss library first. The following example builds and installs faiss with GPU support and avx512 instruction set.

git clone https://github.com/facebookresearch/faiss.git
cd faiss
cmake . -B build -DFAISS_ENABLE_GPU=ON -DFAISS_ENABLE_PYTHON=OFF -DFAISS_OPT_LEVEL=avx512
cmake --build build --config Release -j
cmake --install build install
cd ..

See the official faiss installation instruction for more on how to build and install faiss.

Building a source package

Once faiss is built and installed, build the source package. The following builds and installs the faiss-cpu source package with GPU and AVX512.

export FAISS_ENABLE_GPU=ON FAISS_OPT_LEVEL=avx512
pip install --no-binary :all: faiss-cpu

There are a few environment variables that specifies build-time options.

  • FAISS_INSTALL_PREFIX: Specifies the install location of faiss library, default to /usr/local.
  • FAISS_OPT_LEVEL: Faiss SIMD optimization, one of generic, avx2, avx512. Note that AVX option is only available in x86_64 arch.
  • FAISS_ENABLE_GPU: Setting this variable to ON builds GPU wrappers. Set this variable if faiss is built with GPU support.
  • CUDA_HOME: Specifies CUDA install location for building GPU wrappers, default to /usr/local/cuda.

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.

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 Distribution

faiss_cpu-1.9.0.tar.gz (67.8 kB view details)

Uploaded Source

Built Distributions

faiss_cpu-1.9.0-cp312-cp312-win_amd64.whl (14.9 MB view details)

Uploaded CPython 3.12 Windows x86-64

faiss_cpu-1.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27.5 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

faiss_cpu-1.9.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.7 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

faiss_cpu-1.9.0-cp312-cp312-macosx_11_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

faiss_cpu-1.9.0-cp312-cp312-macosx_10_14_x86_64.whl (7.7 MB view details)

Uploaded CPython 3.12 macOS 10.14+ x86-64

faiss_cpu-1.9.0-cp311-cp311-win_amd64.whl (14.9 MB view details)

Uploaded CPython 3.11 Windows x86-64

faiss_cpu-1.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27.5 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

faiss_cpu-1.9.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.6 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

faiss_cpu-1.9.0-cp311-cp311-macosx_11_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

faiss_cpu-1.9.0-cp311-cp311-macosx_10_14_x86_64.whl (7.7 MB view details)

Uploaded CPython 3.11 macOS 10.14+ x86-64

faiss_cpu-1.9.0-cp310-cp310-win_amd64.whl (14.9 MB view details)

Uploaded CPython 3.10 Windows x86-64

faiss_cpu-1.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27.5 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

faiss_cpu-1.9.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.6 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

faiss_cpu-1.9.0-cp310-cp310-macosx_11_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

faiss_cpu-1.9.0-cp310-cp310-macosx_10_14_x86_64.whl (7.7 MB view details)

Uploaded CPython 3.10 macOS 10.14+ x86-64

faiss_cpu-1.9.0-cp39-cp39-win_amd64.whl (14.9 MB view details)

Uploaded CPython 3.9 Windows x86-64

faiss_cpu-1.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27.5 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

faiss_cpu-1.9.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.6 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

faiss_cpu-1.9.0-cp39-cp39-macosx_11_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

faiss_cpu-1.9.0-cp39-cp39-macosx_10_14_x86_64.whl (7.7 MB view details)

Uploaded CPython 3.9 macOS 10.14+ x86-64

File details

Details for the file faiss_cpu-1.9.0.tar.gz.

File metadata

  • Download URL: faiss_cpu-1.9.0.tar.gz
  • Upload date:
  • Size: 67.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for faiss_cpu-1.9.0.tar.gz
Algorithm Hash digest
SHA256 587fcea9fa478e9307a388754824a032849d317894a607586c3cdd8c8aeb7233
MD5 431c86e9e1919afc9924246435528586
BLAKE2b-256 9257f5af8d68f9a8ec943496aa8fa9b01d7c4e654e918b246f5a0e6c85df6e0d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for faiss_cpu-1.9.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 39a163c2c3c33df10b82fd3b61cb6c8bd7884e2526f1393de32ed71814c5cbfb
MD5 333cbe80aa30c2bd2d8588067098d9b2
BLAKE2b-256 51d64228ddef6324abb7b6a62cf0dd72938147234770b1f04adcb23fa1a424bb

See more details on using hashes here.

File details

Details for the file faiss_cpu-1.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 89f03a4882e27c71ead60d84d06263d3f8592c842f0f469eeaf7883cfd4f2bfa
MD5 4ddd61654fab228a6177b187b10a95e7
BLAKE2b-256 3b2745be1b5e71feef7d22f65c409658d698655a8c86547d20448388521a6697

See more details on using hashes here.

File details

Details for the file faiss_cpu-1.9.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.9.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 31a0b5ec546c7455cf526326194ace125199769ccbc90bb69b464cd4a26b7f4d
MD5 c2c2cc47588096b4ce821370eb93c395
BLAKE2b-256 e520822dd24d168a56f1af0f2aa276b183b2176659c44644e67757015e8272b1

See more details on using hashes here.

File details

Details for the file faiss_cpu-1.9.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.9.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 358be27446389c9df374fba17221ae5e45a7a8c943c4c675f81814d6fb7c31b1
MD5 a91d1332dc518fe699a60a027866b236
BLAKE2b-256 31286ece7a2bf3a4f53b25533353baf47e42055f16004e79554f3fcd975569f2

See more details on using hashes here.

File details

Details for the file faiss_cpu-1.9.0-cp312-cp312-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.9.0-cp312-cp312-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 2ed784120f6be7a7cde90f507831e670b4edc94f20cc7955eef3ae5fba70d449
MD5 d7fffd4fe35ea87d81632ff082f7493d
BLAKE2b-256 147667475a3009c4aeccab462325144738fb62074ed6edbc9ab55cc9ddddc127

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for faiss_cpu-1.9.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 81d8fcb0ef92c9e7af2f7104e321895462681a598aff6d526a8da8272a61c1dd
MD5 5c3ac8412386d23e4a578917164534c9
BLAKE2b-256 872b850200d901fd0409232d9bcae26228ab9aadf4803bbcc38f93d6f81cab37

See more details on using hashes here.

File details

Details for the file faiss_cpu-1.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2baeed5f1d8b006533c71184cc29065892647774a3df9c6f6dc31c1b694f57fa
MD5 32306605af1944ac1f7cc093bb7ea096
BLAKE2b-256 51b24f9abd2b859cef0e2332d3ff032e1973281fac1204fa8da14effc326f528

See more details on using hashes here.

File details

Details for the file faiss_cpu-1.9.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.9.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7f1dc3a42ea386f49a86a9d09a3e30a40fa2e678395df5c2f5706c3f26f06751
MD5 05cb69cefad0a9c51678c4718936019f
BLAKE2b-256 d4c45d83db571038082869265826f04b5d4f0a3249fcd2f0df736b35bae0e2c0

See more details on using hashes here.

File details

Details for the file faiss_cpu-1.9.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.9.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6a4b2871057560020b83ad7bb5aaf3b97b64f980f9af2ca99ba34eeb4fe38bdf
MD5 0ef1c1ae06b6d30973f0ccadf73f4b1d
BLAKE2b-256 6b9ff0a39439a938818f1add48bd7b79d4b8e12e60f2f0c1e4a0b37b295625e0

See more details on using hashes here.

File details

Details for the file faiss_cpu-1.9.0-cp311-cp311-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.9.0-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 b0e9208a36da519dc2eb90e4c44c66a6812a5b68457582d8ed21d04e910e3d1f
MD5 1f8f09b1477027a59a564c15204d32e1
BLAKE2b-256 f5a2b346d976c0adcdeab7d23bf6f58eef6d1c5c9c0bf919353923cf91553049

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for faiss_cpu-1.9.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 eababc154e95930045f86d2483aeb4ed8451b1bb9b97451a2633df20190f5ee2
MD5 6ed6555416fcfff7662ab61fa348db79
BLAKE2b-256 103a4b00c7076581795d8337e51dc65d1a1271b04f07c14b3de01cd32bb9ee96

See more details on using hashes here.

File details

Details for the file faiss_cpu-1.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 091d3df18dc9ae43e47203ff0c3c8ffcd51939a6de17e851751dcc263c86b16b
MD5 81552f48cb3cd0ea38d1a5a15058e5f0
BLAKE2b-256 8f0dbc1dd13611fddf0f15279d73f6cf0f60f2546bb6d4f2daddbc8395c5fc46

See more details on using hashes here.

File details

Details for the file faiss_cpu-1.9.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.9.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 cf76982c45027817df7816232dad9d2f6471637ceaa76c1cc72e858c6e31d8d3
MD5 edbea3b07c1f9986a39a515417acb937
BLAKE2b-256 f931264d61a9e225e5ef360216c05420670ff7bc2efbb4674138bb4a19f9df7f

See more details on using hashes here.

File details

Details for the file faiss_cpu-1.9.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.9.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 81f211896107a114450297571210684701d1fce5b998d8a06e2549f6be7af20c
MD5 4339a6a9ef33fcbf40cb157bcb262a1d
BLAKE2b-256 b11cf8305ad0317d1cad85ec32dc94cd9b54e9b5a27776716a56adbfa270c53d

See more details on using hashes here.

File details

Details for the file faiss_cpu-1.9.0-cp310-cp310-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.9.0-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 e415a149893629db2215776395460d0cf79ac5f56a62242de68f788a22b66818
MD5 ae219653f958308c848fbe8ef148b718
BLAKE2b-256 eac2465250c99399921a33638d444e04e7174aafba3930cf911bf5f0782f9009

See more details on using hashes here.

File details

Details for the file faiss_cpu-1.9.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: faiss_cpu-1.9.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 14.9 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for faiss_cpu-1.9.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 bc40f1029515baa0228c0c5113b870c5d94961d3232ca25f127162945424375b
MD5 1b2301d82804ddb99d7825cce2cd3ad8
BLAKE2b-256 eafd2be4e845873d59cae8e3c730baf7135395b5b9105796ef604af16647ba28

See more details on using hashes here.

File details

Details for the file faiss_cpu-1.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5908e619b3ab2cd1f23f939a995cc2559408dffa9795b69ca78f89a08b993873
MD5 2304365cb0ec9b0b67f7244b8264439b
BLAKE2b-256 9c78ef504458f58422cf33bf4770521b2ee05f251a488d3e591c9466cff9e255

See more details on using hashes here.

File details

Details for the file faiss_cpu-1.9.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.9.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0010ddfd16f7c71e1119111973fe2f34b6abc6b40492b688244e821b5a931964
MD5 67ed573dc2b433eb8c4e443d4853d970
BLAKE2b-256 234f973565ff85e457844236708d1f886b2577d088ff0cadf40bec5c56c0ebad

See more details on using hashes here.

File details

Details for the file faiss_cpu-1.9.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.9.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 25dd895a952b5f6dad5dcdb901f853e33359e24ee2b871f418b87af054ed06e0
MD5 6c9fdf874eab31c52263d0756b09738e
BLAKE2b-256 7e6d6d16ec7d5219d9c7eda1f94e97fdb96a216833ffdc45b38b29a106fd7f7b

See more details on using hashes here.

File details

Details for the file faiss_cpu-1.9.0-cp39-cp39-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for faiss_cpu-1.9.0-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 b04745b9b93736a7bdf18dd459a3362d154a6dae2e450de3f804f193154d79c9
MD5 ce7001f2d4312412248a09903a71dc10
BLAKE2b-256 70ea5f9c2d34161ac2f216623929579305ec0c018b3e89c23eee282f01624029

See more details on using hashes here.

Supported by

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