# FAISS
**FAISS (Facebook AI Similarity Search) is the de facto library for fast similarity search over dense vectors.** Built by Meta's FAIR, written in C++ with Python bindings, and the baseline almost every newer vector index gets benchmarked against.
It does one thing well: given millions or billions of [[Embeddings]], find the nearest neighbours of a query vector quickly. You trade a little recall for a lot of speed and memory through approximate nearest-neighbour (ANN) indexes.
## What's inside
- **Index families.** Flat (exact brute force), IVF (inverted file, cluster-then-search), HNSW (graph-based), PQ/IndexPQ (product quantization for compression), and FastScan for SIMD-accelerated quantized search.
- **Quantization.** Product quantization shrinks vectors to a few bytes so huge corpora fit in RAM, at some cost to recall.
- **GPU support.** Many indexes run on GPU for large-scale builds and search.
## Why it matters here
FAISS is the reference point. When a tool like [[Turbovec]] says it "searches faster than FAISS" or stays "within 1.9 points of FAISS IndexPQ at R@1", FAISS IndexPQ and FastScan are the bars being cleared. Knowing the FAISS index zoo is how you read those claims.
License: MIT.
## References
- https://github.com/facebookresearch/faiss
## Related
- [[Embeddings]]
- [[Vector Store]]
- [[Semantic Search]]
- [[Turbovec]]
- [[qmd]]
- [[Retrieval-Augmented Generation (RAG)]]