Start studying
Module 8 · Embeddings & Search Module contents
Module 8  ·  Card 11 / 17intermediate

FAISS

FAISS is a library from Meta for fast similarity search over dense vectors.

It handles collections of millions to billions of vectors.

It offers several index types trading accuracy against speed and memory.

It supports GPU acceleration for very large workloads.

It is a library rather than a service, so you manage storage and updates yourself.

Learn in depth ↓
Module 08 · Embeddings & Search · 17 concepts
In depth  /  15 lines

FAISS, in more detail

FAISS is a library from Meta for similarity search over dense vectors.

It is the reference implementation that most vector search is measured against.

It handles collections from thousands to billions of vectors.

It is a library, not a service, so it runs inside your own process.

That makes it fast and cheap and leaves persistence and updates to you.

There is no server, no authentication and no replication built in.

It offers many index types, which is its main strength and its main confusion.

A flat index compares against everything and is exact and slow.

IVF indexes cluster the space and search only the nearest clusters.

HNSW indexes build a navigable graph and give excellent recall for the speed.

Product quantisation compresses vectors so far more fit in memory, at some accuracy cost.

Indexes can be combined, such as IVF with quantisation for very large corpora.

GPU support makes very large workloads practical.

Start with a flat index until it is genuinely too slow, since exact answers are worth having.

It is the right choice for a static corpus embedded in an application, and a poor one for constantly changing data.

Want the full technical article? Wikipedia ↗
Test yourself

One question on this card. Every option explains itself once you pick, right or wrong.

Question 1
What does FAISS leave for you to handle yourself?
Embeddings & Search

17 concepts in this module, then a graded test with every answer explained.

Study this module →
↑↓ move↵ openesc close