Similarity search library for dense vectors
Top 0.8% on sourcepulse
Faiss is a C++ library with Python bindings for efficient similarity search and clustering of dense vectors, targeting researchers and engineers working with large-scale vector datasets. It offers algorithms that can handle datasets exceeding available RAM, providing significant speedups for nearest neighbor searches.
How It Works
Faiss implements various indexing structures and search algorithms, including exact search baselines and approximate methods that use compressed vector representations. These methods trade search precision for memory efficiency and speed, enabling scaling to billions of vectors. It supports L2 (Euclidean) distance, dot product, and cosine similarity metrics. The library also features GPU acceleration via CUDA and ROCm, offering substantial performance gains for both exact and approximate search.
Quick Start & Requirements
pip install faiss-cpu
or pip install faiss-gpu
(for GPU support).Highlighted Details
Maintenance & Community
Developed primarily by Meta's Fundamental AI Research group. Community discussions and questions are hosted on GitHub Discussions.
Licensing & Compatibility
MIT License. Permissive for commercial use and integration into closed-source projects.
Limitations & Caveats
Approximate search methods may sacrifice some precision for speed and memory efficiency. The README does not detail specific hardware requirements for optimal GPU performance beyond CUDA compatibility.
16 hours ago
Inactive