Skip to main content

Facebook Faiss

Facebook AI Similarity Search (Faiss) is a library for efficient similarity search and clustering of dense vectors. It contains algorithms that search in sets of vectors of any size, up to ones that possibly do not fit in RAM. It also contains supporting code for evaluation and parameter tuning.

Faiss documentation.

Installation and Setup​

We need to install faiss python package.

pip install faiss-gpu # For CUDA 7.5+ supported GPU's.

OR

pip install faiss-cpu # For CPU Installation

Vector Store​

See a usage example.

from langchain.vectorstores import FAISS