Discover / RAG & Knowledge
FAISS
by facebookresearchC++
Library for efficient similarity search of dense vectors by Meta.
Maturity: stable because 9y old, v1.14.3 released 51d ago. Derived from release and commit history, not a rating.
- Stars
- 41k
- Forks
- 4.5k
- Downloads / mo
- 16.0M
- Last commit
- 2026-08-02
- License
- MIT
- Open issues
- 278
Market and trust evidence
Edition not yet matchedNo exact skills.sh identity match is available for this repository. Repository adoption and freshness remain visible above; install momentum is not inferred.
Trust analysis is a screening signal, not a security warranty. Read the ranking and trust methodology.
In practice
Written by AI from this repository’s README · high confidenceNearest neighbour search over millions or billions of vectors is too slow and too memory hungry when written by hand.
Use it when
Use it when you need low level control over index type, memory footprint and the speed versus recall tradeoff.
Not the right pick when
Compressed and quantized methods come at the cost of a less precise search, as the README states.
Capabilities
- search in sets of vectors of any size, including ones that do not fit in RAM
- compressed representations that scale to billions of vectors on one server
- HNSW and NSG indexing structures on top of raw vectors
- GPU indexes usable as drop-in replacements for CPU indexes
- single and multi-GPU support
- supporting code for evaluation and parameter tuning
Requirements
- a BLAS implementation as the only hard dependency
- CUDA or AMD ROCm for optional GPU support
- cmake to compile
Cost: Free and open source
Install
Derived from the published package name in the repository, not from a model.
Video walkthroughs
Vector Databases Explained: Pinecone vs FAISS vs Chroma — Which One Should You Use?
Vector Search & Approximate Nearest Neighbors (ANN) | FAISS (HNSW & IVF)
Third-party YouTube uploads matched to this tool by title, channel and repository name on 2026-08-03. Not made, reviewed or endorsed by SkillPilot. View counts and publish months are as of the match date and the month is approximate. Nothing loads from YouTube until you press play.
What the repository ships
Detected from the actual files in the repository root.
Latest release v1.14.3
Published 2026-06-13
Highlights
- Metal GPU backend expansion — new
MetalIndexIVFFlatwith IVF scan/merge kernels and expanded top-k support (#5202); Metal now enabled by default on Apple Silicon machines (#5280) - TurboQuant in ScalarQuantizer — full Algorithm 2 (QJL stage) with SIMD and optimizations (#5170)
- Sapphire Rapids (SPR) optimizations — ScalarQuantizer L2/IP (#5173), VPOPCNTDQ-based HammingComputer (#5183), and VPOPCNTDQ-based RaBitQ kernel (#5149)
- faiss-gpu pip wheels — new GPU wheel packaging (#5131); musllinux wheels re-enabled for faiss-cpu (#5299)
- SVS static vamana support (#5224)
- HNSW
is_similaritymode for IP/similarity metrics (#5246, #5226) - HNSW search performance — reserve
VisitedTableSetcapacity to avoid rehashes (#5290),search_from_candidate_unboundedtemplatized forVisitedTabledevirtualization (#5270), and runtime checks avoided inVisitedTable(#5234) - NEON FINE_SIZE=2 specializations for
Index2LevelDecoderImplandIndexPQDecoder(#5255) - cuVS upgraded to 26.06 (#5240); CI updated to ROCm 7 (#5196)
- Deserialization hardening — bool-field validation (#5279) and null inner-index rejection in IDMap / BinaryFromFloat (#5239)
- Build robustness — fix non-AVX2 import SIGILL via
.rodatapartitioning tables (#5298), Windows ARM64 (MSVC) NEON build fix (#5274), and AVX512_SPR dispatch fix on AMD (#5281)
Full Changelog
Added
- 261d8f25aac03c980f1faf5df775248eff96cb6d Add IVFSQTurboQSearchParameters to __init__.pyi stub (#5304)
- 684a32d0404758bddd4f7fb9ec76db54252819e0 Add manual Faiss nightly workflow dispatch (#5300)
- 10b6b2a1e554afc4cbd66fe73d864728ff9e310c Add MetalIndexIVFFlat with IVF scan/merge kernels and expanded top-k support (#5202)
- 74d36198faac528fce715aa8731bf589727bef6d TurboQuant in ScalarQuantizer: full Algorithm 2 (QJL stage) with SIMD and optimizations (#5170)
- 506600962f8a58926710edd24715bc9002eb18e9 Add Python HNSW tutorial (#5260)
- 3cff0f419c459bdc7c4f56ea49effb6d7da1475c Add Sapphire Rapids optimizations for ScalarQuantizer (L2, IP) (#5173)
- 46ef80db639e4de03720e3c404065636846ed47e Support IndexIDMap/IndexIDMap2 in reverse_index_factory (#5266)
- 420158b10e0136228ff634d464fa90c4370a1ead Add VPOPCNTDQ-based HammingComputer for Sapphire Rapids+ (#5183)
- d8f1c2716d9c2c070c0d7e4e0c1017331e9e9e8a Implement NEON-based FINE_SIZE=2 specializations for Index2LevelDecoderImpl and IndexPQDecoder (#5262)
- 0951b5337b72755ade5c02705396fb7d7cedceac Support user provided blas library (#5189)
- 215740ecc3add92d7c27e24436b2dffd8fdb157c SVS static vamana support (#5224)
- d24ad6ef5b3e40c0e4cf8b695923cbcd674d2573 Add is_similarity mode to HNSW (#5246)
- aa332cd5f0d6984075c849b32c387fffe067a49a Implement NEON-based FINE_SIZE=2 specializations for Index2LevelDecoderImpl and IndexPQDecoder (#5255)
- 5d9aae6ee81078d33ff3c4e2fc97f7583e2e450d Add faiss-gpu pip wheel packaging (#5131)
- 6f1cf64531130db04843737d1f538999fc295583 Add VPOPCNTDQ-based RaBitQ kernel for Sapphire Rapids+ (#5149)
Changed
- 262fc3c7a2ec099cdd0cd21482931702171c60eb Re-enable musllinux wheels for faiss-cpu (#5299)
- 1cdc3709c656eea41ce3725024070f2516e3b30b Run CI on push to main to refresh ccache cache (#5291)
- 379ee758b1bb49cd167c6ed86e80be331e94c593 Reserve VisitedTableSet capacity to avoid rehashes during HNSW search (#5290)
- 6513a2497cbc29f5c0c74c0d17bbe8b9f6ff3230 Enable Metal by default on Apple machines (#5280)
- fe46c3c804296cc04238c2e17b02c671887791a8 Validate bool fields during deserialization (#5279)
- 480f91790080c8daa92fcb1941c5e8d0f56de237 Type imbalance_factor and wire the .pyi stub into the buck build (#5269)
- e60baeb7b61e617a483310fccb239ba204458c7b Templatize search_from_candidate_unbounded for VisitedTable devirtualization (#5270)
- c000190dc07c161898093a72a16f3918bd9fd621 Accelerate ScalarQuantizer::QT_bf16 with AVX512-BF16. (#4889)
- 7504fc8ddebdade7fcabd9dacd9861318d475b50 Upgrade CUVS Version to 26.06 (#5240)
- d12683c3b00247ca6333ac717f3a
Tags
README
Faiss
Faiss is a library for efficient similarity search and clustering of dense vectors. It contains algorithms that search in sets of vectors of any size, up to ones that possibly do not fit in RAM. It also contains supporting code for evaluation and parameter tuning. Faiss is written in C++ with complete wrappers for Python/numpy. Some of the most useful algorithms are implemented on the GPU. It is developed primarily at Meta's Fundamental AI Research group.
News
See CHANGELOG.md for detailed information about latest features.
Introduction
Faiss contains several methods for similarity search. It assumes that the instances are represented as vectors and are identified by an integer, and that the vectors can be compared with L2 (Euclidean) distances or dot products. Vectors that are similar to a query vector are those that have the lowest L2 distance or the highest dot product with the query vector. It also supports cosine similarity, since this is a dot product on normalized vectors.
Some of the methods, like those based on binary vectors and compact quantization codes, solely use a compressed representation of the vectors and do not require to keep the original vectors. This generally comes at the cost of a less precise search but these methods can scale to billions of vectors in main memory on a single server. Other methods, like HNSW and NSG add an indexing structure on top of the raw vectors to make searching more efficient.
The GPU implementation can accept input from either CPU or GPU memory. On a server with GPUs, the GPU indexes can be used a drop-in replacement for the CPU indexes (e.g., replace IndexFlatL2 with GpuIndexFlatL2) and copies to/from GPU memory are handled automatically. Results will be faster however if both input and output remain resident on the GPU. Both single and multi-GPU usage is supported.
Installing
Faiss comes with precompiled libraries for Anaconda in Python, see faiss-cpu, faiss-gpu and faiss-gpu-cuvs. The library is mostly implemented in C++, the only dependency is a BLAS implementation. Optional GPU support is provided via CUDA or AMD ROCm, and the Python interface is also optional. The backend GPU implementations of NVIDIA cuVS can also be enabled optionally. It compiles with cmake. See INSTALL.md for details.
How Faiss works
Faiss is built around an index type that stores a set of vectors, and provides a function to search in them with L2 and/or dot product vector comparison. Some index types are simple baselines, such as exact search. Most of the available indexing structures correspond to various trade-offs with respect to
- search time
- search quality
- memory used per index vector
- training time
- adding time
- need for external data for unsupervised training
The optional GPU implementation provides what is likely (as of March 2017) the fastest exact and approximate (compressed-domain) nearest neighbor search implementation for high-dimensional vectors, fastest Lloyd's k-means, and fastest small k-selection algorithm known. The implementation is detailed here.
Full documentation of Faiss
The following are entry points for documentation:
- the full documentation can be found on the wiki page, including a tutorial, a FAQ and a troubleshooting section
- the doxygen documentation gives per-class information extracted from code comments
- to reproduce results from our research papers, Polysemous codes and Billion-scale similarity search with GPUs, refer to the benchmarks README. For [
Link and code: Fast indexing with graphs and compact regression codes](https://arxiv.org/abs/1804.09996), see the link_and_code README
Authors
The main authors of Faiss are:
- Hervé Jégou initiated the Faiss project and wrote its first implementation
- Matthijs Douze implemented most of the CPU Faiss
- Jeff Johnson implemented all of the GPU Faiss
- Lucas Hosseini implemented the binary indexes and the build system
- Chengqi Deng implemented NSG, NNdescent and much of the additive quantization code.
- Alexandr Guzhva many optimizations: SIMD, memory allocation and layout, fast decoding kernels for vector codecs, etc.
- Gergely Szilvasy build system, benchmarking framework.
Reference
References to cite when you use Faiss in a research paper:
@article{douze2024faiss,
title={The Faiss library},
author={Matthijs Douze and Alexandr Guzhva and Chengqi Deng and Jeff Johnson and Gergely Szilvasy and Pierre-Emmanuel Mazaré and Maria Lomeli and Lucas Hosseini and Hervé Jégou},
year={2024},
eprint={2401.08281},
archivePrefix={arXiv},
primaryClass={cs.LG}
}
For the GPU version of Faiss, please cite:
@article{johnson2019billion,
title={Billion-scale similarity search with {GPUs}},
author={Johnson, Jeff and Douze, Matthijs and J{\'e}gou, Herv{\'e}},
journal={IEEE Transactions on Big Data},
volume={7},
number={3},
pages={535--547},
year={2019},
publisher={IEEE}
}
Join the Faiss community
For public discussion of Faiss or for questions, visit https://github.com/facebookresearch/faiss/discussions.
We monitor the issues page of the repository.
You can report bugs, ask questions, etc.
Legal
Faiss is MIT-licensed, refer to the LICENSE file in the top level directory.
Copyright © Meta Platforms, Inc.