Skip to content
← Tools / Skills
ToolMeta (FAIR)/10 trustVerified
Faiss logo

Faiss

Meta's library for billion-scale dense-vector similarity search.

Visit official site →

About

Faiss is Meta's Fundamental AI Research library for efficient similarity search over dense vectors — the engine inside a large share of the world's vector search deployments. It implements exact search plus approximate indexes (IVF, HNSW, product quantization, binary codes) that trade recall for speed and memory, scaling to billions of vectors on a single server, with GPU implementations that drop in as replacements for CPU indexes. Written in C++ with full Python/numpy wrappers; CUDA and AMD ROCm support. It is a library, not a database: no persistence or replication — pair it with your own storage or a vector DB for production.

What it can do

  • **Approximate indexes**: IVF, HNSW, NSG, product quantization, binary indexes
  • **Billion-scale**: compressed codes fit billions of vectors in RAM on one server
  • **GPU drop-in**: GpuIndex* variants replace CPU indexes; single and multi-GPU
  • **Evaluation tooling**: built-in benchmarking, parameter autotuning, recall measurement
  • **Clustering**: fast k-means (including GPU) for building indexes
  • **Research-backed**: arXiv papers on the library and billion-scale GPU search

Setup

```bash

# via conda (primary channel) or pip

pip install faiss-cpu

```

```python

import faiss, numpy as np

index = faiss.IndexFlatL2(128)

index.add(np.random.random((10000, 128)).astype("float32"))

distances, ids = index.search(np.random.random((5, 128)).astype("float32"), k=10)

```

GPU builds: faiss-gpu / faiss-gpu-cuvs on Anaconda. Wiki tutorial: github.com/facebookresearch/faiss/wiki.

Prerequisites

Python 3.9+ (or C++ toolchain for the native lib). Optional: CUDA/ROCm GPU for GPU indexes.

Use cases

vector searchrecommendationsRAGdeduplication

Works with

customGeneric API

Trust score — 9/10

/10 trustVerified

Scored 9/10 (verified tier, metrics-v1). Evidence: 41,134 GitHub stars (log-scaled vs catalog peers); blended with ~12,177,213 monthly package downloads; last push 0d ago; 9 releases/12mo; 339 open issues. Manual review: Meta FAIR dense-vector search; exact+approximate indexes, GPU drop-in, billion-scale; library not database — no persistence/replication built in. License: MIT.

★ 41,134 GitHub stars

How the trust score is built

Full methodology →
Adoption · stars/downloads, log-scaled vs peers
9.0/10
Maintenance · recency, releases, issue load
9.1/10
Openness · license + docs
10.0/10
Manual review · sanity read + red-flag check
9.0/10
  • · 41,134 GitHub stars (log-scaled vs catalog peers)
  • · blended with ~12,177,213 monthly package downloads
  • · last push 0d ago; 9 releases/12mo; 339 open issues
  • · manual review: Meta FAIR dense-vector search; exact+approximate indexes, GPU drop-in, billion-scale; library not database — no persistence/replication built in

Sources

Every fact above was checked against these sources. Where a claim comes from the provider and couldn't be independently verified, the text says so.