Faiss

active

by Meta (FAIR) · since 2017 · also known as FAISS, Facebook AI Similarity Search

Meta's C++/Python library for fast dense-vector similarity search and clustering, CPU and GPU.

vectorembedded libraryopen source (permissive)mature

Overview

Faiss is the reference library for approximate nearest neighbour search, developed by Meta's FAIR lab since 2017. It provides a toolkit of index types (flat, IVF, HNSW, PQ/OPQ, scalar and additive quantizers, binary) that can be composed via index factory strings, plus GPU implementations including NVIDIA cuVS integration for billion-scale batch search. It is a library, not a database: there is no server, no metadata store and no durability beyond writing index files. Many vector databases and research systems use Faiss internally or benchmark against it.

Strengths & trade-offs

Strengths

  • +Widest range of ANN index and quantization algorithms in one library
  • +State-of-the-art GPU search, including cuVS integration
  • +Composable index factory for quick experimentation
  • +Battle-tested at Meta scale and in countless research papers
  • +Permissive MIT licence

Trade-offs

  • −No metadata filtering, persistence layer or server
  • −Deletes and updates are awkward for many index types
  • −Choosing and tuning index types needs expertise
  • −Scaling beyond one machine is your problem

Great for

  • +Embedding similarity search inside ML pipelines
  • +Offline deduplication and clustering
  • +Building custom vector search services
  • +ANN research and benchmarking

Think twice for

  • −Applications needing a database with CRUD and filters
  • −Multi-tenant production services without extra infrastructure
  • −Teams without ML engineering skills

Capabilities

Native or official first-party support · 3 of 25 tracked

✓Vector search
✓In-memory
✓Compression
–Transactions
–Joins
–Secondary indexes
–Full-text search
–Geospatial
–JSON
–Change data capture
–Triggers
–Stored procedures
–Materialized views
–TTL / expiry
–Pub/Sub
–Columnar storage
–Durable persistence
–Encryption at rest
–Role-based access
–Time travel
–Branching
–Online schema changes
–Streaming ingest
–Offline sync
–Runs in WebAssembly

Scale & consistency

Comfortable data size
Large · ≤ 1 PB
Horizontal scaling
Manual
Multi-region
No
Transactions
None
Consistency
Strong
Schema
Schemaless
Architecture
Embedded, In memory
Query languages
C++ API, Python API

Billion-vector indexes on a single GPU server are documented; distribution across machines is up to the application.

Deployment

Self-hosted Vendor-managed cloud Serverless Embedded Edge Kubernetes operator

Ecosystem

apis & protocolsC++, Python, C
client languagesC++, Python, C

Alternatives to Faiss

Compare all→
USearchVector23.1

Single-header C++ HNSW library with SIMD distance kernels and bindings for a dozen languages.

faiss vs usearch →
MilvusVector45.9

Cloud-native, distributed open-source vector database built for billions of vectors.

faiss vs milvus →
QdrantVector35.9

Rust vector search engine with rich payload filtering, quantization and a managed cloud.

faiss vs qdrant →
LanceDBVector27.5

Embedded, serverless retrieval database on the Lance columnar format for multimodal AI data.

faiss vs lancedb →
ValdVector5.6

Kubernetes-native distributed vector search engine built on Yahoo Japan's NGT.

faiss vs vald →
ScaNNVector6.3

Google Research's ANN library using anisotropic quantization; the tech behind Vertex AI and AlloyDB vectors.

faiss vs scann →

Faiss FAQ

What is Faiss?

Faiss is a vector database by Meta (FAIR), first released in 2017. Faiss is the reference library for approximate nearest neighbour search, developed by Meta's FAIR lab since 2017. It provides a toolkit of index types (flat, IVF, HNSW, PQ/OPQ, scalar and additive quantizers, binary) that can be composed via index factory strings, plus GPU implementations including NVIDIA cuVS integration for billion-scale batch search. It is a library, not a database: there is no server, no metadata store and no durability beyond writing index files. Many vector databases and research systems use Faiss internally or benchmark against it.

Is Faiss open source?

Yes. Faiss is open source. License: MIT License.

Does Faiss support ACID transactions?

No. Faiss does not provide ACID transactions; its consistency model is strong.

Does Faiss scale horizontally?

Faiss has no built-in sharding; scaling out means partitioning data in your application. It is comfortable at large scale (≤ 1 PB).

How can I run Faiss?

You can self-host it and embed it in your application.

What is Faiss best for?

Faiss is a strong fit for embedding similarity search inside ML pipelines; offline deduplication and clustering; and building custom vector search services. Think twice for applications needing a database with CRUD and filters.

What are the best alternatives to Faiss?

Common alternatives to Faiss include USearch, Milvus, Qdrant, LanceDB and Vald. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.

How popular is Faiss?

Faiss ranks #40 of 844 databases on the WhichDB Score (44.7/100), and #3 among vector databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.