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 is written in C++ with complete wrappers for Python/numpy. Some of the most useful algorithms are implemented on the GPU. It is developed by Facebook AI Research. Faiss contains several methods for similarity search. It assumes that the instances are represented as vectors and are identified by an integer, and that the vectors can be compared with L2 (Euclidean) distances or dot products. Vectors that are similar to a query vector are those that have the lowest L2 distance or the highest dot product with the query vector. It also supports cosine similarity, since this is a dot product on normalized vectors.

Features

  • The library is mostly implemented in C++, with optional GPU support provided via CUDA, and an optional Python interface
  • Faiss handles collections of vectors of a fixed dimensionality d, typically a few 10s to 100s
  • The CPU version requires a BLAS library. It compiles with a Makefile and can be packaged in a docker image
  • Faiss is built around an index type that stores a set of vectors, and provides a function to search in them with L2 and/or dot product vector comparison
  • The optional GPU implementation provides what is likely the fastest exact and approximate nearest neighbor search implementation for high-dimensional vectors
  • Faiss is built around the Index object. It encapsulates the set of database vectors, and optionally preprocesses them to make searching efficient

Project Samples

Project Activity

See All Activity >

Categories

Clustering, Libraries

License

MIT License

Follow Faiss

Faiss Web Site

Other Useful Business Software
$300 Free Credits to Build on Google Cloud Icon
$300 Free Credits to Build on Google Cloud

New to Google Cloud? Get $300 in credits to explore Compute Engine, BigQuery, Cloud Run, Gemini Enterprise Agent Platform, and more.

Start your next project with $300 in free Google Cloud credit. Spin up VMs, run containers, query petabytes in BigQuery, or build agents with Gemini Enterprise Agent Platform. Once your credits are used, keep building with 20+ always-free tier products including Compute Engine, Cloud Storage, GKE, and Cloud Run functions. No commitment required—just sign up and start building.
Claim $300 Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Faiss!

Additional Project Details

Programming Language

C++

Related Categories

C++ Clustering Software, C++ Libraries

Registered

2021-04-28