Faiss: Similarity search and clustering for dense vectors
Efficient approximate nearest neighbor search for billion-scale vectors.
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.
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.
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.
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)See how people are using FAISS
Top in AI & ML
Related Repositories
Discover similar tools and frameworks used by developers
Open WebUI
Extensible multi-LLM chat platform with RAG pipeline.
LightRAG
Graph-based retrieval framework for structured RAG reasoning.
Triton
Domain-specific language and compiler for writing GPU deep learning primitives with higher productivity than CUDA.
CodeFormer
Transformer-based face restoration using vector-quantized codebook lookup.
PaddleOCR
Multilingual OCR toolkit with document structure extraction.
Related Reading
Guides and comparisons from the Greptile content library
Greptile Ranks #1 on Martian's AI Code Review Benchmark
Greptile ranks #1 on Martian's independent online AI code review benchmark, leading all evaluated tools in F1 score and precision with near-leading recall.
Best CodeRabbit Alternatives for Smarter AI Code Reviews in 2026
7 powerful CodeRabbit alternatives ranked by real dev teams. Feature comparison, pricing analysis, and honest reviews to find your perfect AI code reviewer.
Best Developer Productivity Tools in 2026
The best developer productivity tools in 2026, compared by the workflow problem they solve: code review, autocomplete, AI-native editing, terminal agents, code search, observability, and security.
Best AI Code Review Tools for GitHub
Top-rated AI code review tools for GitHub teams in 2025. Compare features, pricing, and accuracy to find the perfect fit for faster PR reviews and bulletproof code quality.