Navigate:
~$FAISS0.1%

Faiss: Similarity search and clustering for dense vectors

Efficient approximate nearest neighbor search for billion-scale vectors.

LIVE RANKINGS • 06:52 AM • STEADY
OVERALL
#106
28
AI & ML
#49
9
30 DAY RANKING TREND
ovr#106
·AI#49
STARS
38.7K
FORKS
4.2K
DOWNLOADS
41
7D STARS
+35
7D FORKS
+3
Tags:
See Repo:
Share:

Learn more about faiss

Faiss is a C++ library designed for similarity search and clustering operations on dense vector collections. It implements various indexing algorithms that support L2 distance and dot product comparisons, including methods based on binary vectors, quantization codes, and graph-based structures like HNSW and NSG. The library can handle vectors that exceed available RAM through compressed representations and scaling techniques, while optional GPU implementations provide accelerated search and clustering operations. Common applications include approximate nearest neighbor search at scale, vector database operations, and clustering tasks in machine learning pipelines.


1

Multiple Index Types

Offers exact search baselines and approximate methods using quantization, graphs, and hybrid structures. Engineers select indexes based on specific constraints like memory limits, accuracy requirements, or query latency targets.

2

Drop-in GPU Acceleration

CPU indexes run on NVIDIA or AMD GPUs with automatic memory management and no code changes. Supports single and multi-GPU configurations with optional cuVS backend for additional performance.

3

Compressed Vector Storage

Stores only quantized representations instead of original vectors, reducing memory by 8-64x. Enables billion-scale indexing on single machines with controlled precision trade-offs.


import faiss
import numpy as np

# Create random vectors and build index
vectors = np.random.random((1000, 128)).astype('float32')
index = faiss.IndexFlatL2(128)
index.add(vectors)

# Search for 5 nearest neighbors
query = np.random.random((1, 128)).astype('float32')
distances, indices = index.search(query, k=5)

vv1.13.0

Release notes do not specify breaking changes, new requirements, or feature details beyond the version increment.

  • Review the full changelog link to identify any breaking changes or migration steps before upgrading.
  • Test thoroughly in staging as the provided release notes contain no actionable upgrade guidance.
vv1.12.0

Adds binary CAGRA GPU index, cuVS 25.08 integration with fp16/int8 support, RaBitQ SIMD optimizations, and extended API suffix; no breaking changes noted.

  • Upgrade cuVS to 25.08 and enable fp16/int8 support for CAGRA indexes; add GpuIndexBinaryCagra for binary vector search.
  • Pin openblas to 0.3.30 if using nightlies; static CUDA linking now optional via build flag for deployment flexibility.
vv1.11.0

Adds RaBitQ quantization, memory-mapping/zero-copy deserialization, and CAGRA/HNSW enhancements; fixes integer overflows in IndexNSG and IVF sharding.

  • Integrate RaBitQ quantization and enable memory-mapped index loading for reduced memory footprint during deserialization.
  • Upgrade to libcuvs 25.04 and fix int32 overflow in IndexNSG plus IVF centroid sharding ID generation bugs.

See how people are using faiss

Loading tweets...


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers