-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Installing Faiss
Matthijs Douze edited this page Jan 27, 2021
·
5 revisions
See INSTALL.md
Commands for an ubuntu 18 image on an Amazon c6g.8xlarge machine :
set -e
sudo apt-get install libatlas-base-dev libatlas3-base
sudo apt-get install clang-8
sudo apt-get install swig
# cmake provided with ubuntu is too old
wget https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3.tar.gz
tar xvzf cmake-3.19.3.tar.gz
cd cmake-3.19.3/
./configure --prefix=/home/matthijs/cmake && make -j
cd $HOME
alias cmake=$HOME/cmake/bin/cmake
# clone Faiss
git clone https://github.com/facebookresearch/faiss.git
cd faiss
cmake -B build -DCMAKE_CXX_COMPILER=clang++-8 -DFAISS_ENABLE_GPU=OFF -DPython_EXECUTABLE=$(which python3) -DFAISS_OPT_LEVEL=generic -DCMAKE_BUILD_TYPE=Release -DBUILD_TEST\
ING=ON
(cd build/faiss/python/ ; python3 setup.py build)
# run tests
export PYTHONPATH=$PWD/build/faiss/python/build/lib/
python3 -m unittest discover
Faiss building blocks: clustering, PCA, quantization
Index IO, cloning and hyper parameter tuning
CPU Faiss + Intel SVS - Overview
GPU Faiss + NVIDIA cuVS - Overview
GPU Faiss + NVIDIA cuVS - Usage
Threads and asynchronous calls
Inverted list objects and scanners
Indexes that do not fit in RAM
Brute force search without an index
Fast accumulation of PQ and AQ codes (FastScan)
Setting search parameters for one query
Binary hashing index benchmark