Home

Faiss

FAISS, short for Facebook AI Similarity Search, is a library for efficient similarity search and clustering of dense vectors. It provides algorithms to find nearest neighbors in high-dimensional spaces and to cluster large collections of vectors. Designed for scalable performance, FAISS aims to enable fast searches on modern hardware for very large datasets.

Developed by Facebook AI Research (FAIR), FAISS is open-source and primarily implemented in C++ with Python bindings

FAISS offers a spectrum of index types. Exact search can be performed with a flat (brute-force) index.

The library emphasizes GPU acceleration and supports multi-GPU configurations, batch queries, and integration with Python, NumPy,

FAISS is used in research and production for vector search in recommender systems, image and text similarity,

(pyfaiss).
It
runs
on
CPU
and
GPU,
supports
indexing
and
searching
across
billions
of
vectors,
and
is
widely
used
to
retrieve
similar
embeddings
produced
by
neural
models
in
production
and
research
settings.
Approximate
search
uses
inverted-file
indices
(IVF)
with
product
quantization
(IVF-PQ)
and
optimized
product
quantization
(OPQ).
It
also
provides
HNSW-based
indexes
for
efficient
graph-based
search.
Indices
can
be
trained
on
sample
data
prior
to
indexing.
and
PyTorch
workflows.
It
includes
clustering
tools
such
as
k-means
and
utilities
for
preprocessing,
normalization,
and
dimensionality
reduction.
Outputs
include
the
indices
of
nearest
neighbors
and
their
distances.
and
retrieval
pipelines.
It
is
maintained
as
an
open-source
project
and
hosted
on
GitHub
under
a
permissive
license.