facebookresearch/faiss

A library for efficient similarity search and clustering of dense vectors.

github.com/facebookresearch/faiss
facebookresearch/faiss homepage screenshot

About facebookresearch/faiss

Faiss is an open-source library for similarity search and clustering of dense vectors. It stores vectors identified by integers and compares them with L2 distance or dot product, including cosine similarity as dot product on normalized vectors. It is written in C++ with Python/numpy wrappers.

It can search vector sets of any size, including sets that may not fit in RAM, and includes supporting code for evaluation and parameter tuning. Compressed methods can scale to large collections in memory but generally give less precise search, and index choices involve trade-offs in search time, quality, memory use, training time, and need for external data for unsupervised training.

Key features

  • Search dense vectors by L2 distance or dot product
  • Support cosine similarity on normalized vectors
  • Cluster dense vectors with evaluation and tuning code
  • Compressed indexes using binary vectors and quantization codes
  • Graph indexes such as HNSW and NSG over raw vectors
  • GPU indexes usable as drop-in replacements for CPU indexes
Best for: Developers and researchers who need to search or cluster large collections of dense vectors in C++ or Python.
Good for
  • Written in C++ with Python/numpy wrappers
  • Handles vector sets that may not fit in RAM
  • Supports single and multi-GPU use with CPU or GPU memory input
Watch out for
  • Compressed representations generally give less precise search
  • Index choices trade off search time, quality, memory and training time
  • Some indexes need external data for unsupervised training

facebookresearch/faiss at a glance

Type
Open-source project
Pricing
Not confirmed. Check the site
Open source
Yes · Source code
Language
English
Last checked
Oct 6, 2026 · Online when checked
Listed
Oct 5, 2026

facebookresearch/faiss alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 24 alternatives

Popular in AI Infrastructure & MLOps

Well-known listings from the same topic.

All 341

facebookresearch/faiss FAQ

What vector comparisons does Faiss support?
L2 distance and dot product, with cosine similarity supported as dot product on normalized vectors. Vectors are identified by integers.
Does Faiss support GPUs?
Yes. The GPU implementation accepts input from CPU or GPU memory, supports single and multi-GPU use, and GPU indexes can replace CPU indexes with automatic copying.
How is Faiss installed?
Precompiled Anaconda packages faiss-cpu, faiss-gpu and faiss-gpu-cuvs are available. It is mostly C++ with only a BLAS dependency, optional CUDA or AMD ROCm, optional Python interface, and builds with cmake.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing