faiss

A library for fast similarity search and clustering of dense vectors, able to handle collections too large for memory. It is commonly used for embedding search and recommendation.

Share on XLicense: MIT

Overview

Faiss is a library for similarity search and clustering of dense vectors. It assumes each item is a vector with an integer ID, and finds the vectors closest to a query by L2 distance or dot product. Cosine similarity is supported through normalized vectors. It can search collections of any size, including ones that do not fit in RAM. It is written in C++ with full Python and numpy wrappers, and some algorithms run on the GPU.

Key features

  • Nearest-neighbor search by L2 distance or dot product
  • Handles vector sets larger than RAM
  • C++ core with complete Python and numpy wrappers
  • Some algorithms available on the GPU
  • Code for evaluation and parameter tuning

Best for

Engineers building embedding search or recommendation features who need to search many vectors quickly. It is developed mainly at Meta's Fundamental AI Research group.

Upstream
facebookresearch/faiss
Fork on GitHub
Guo-astro/faiss
Upstream stars
41k
Category
Developer tools and infrastructure
Language
C++
License
MIT
Forked
2025-11-12
Sync status
In syncLast synced 2026-09-29