Why Per-Token Vectors Make a Search Index Large
What the post says about multi-vector models, the storage arithmetic and the idea of merging similar vectors.
For: Learners new to embedding search.
One vector per token
Multi-vector models such as ColBERT instead keep a collection of contextual token vectors, allowing different parts of a query to match different parts of a document.[1]
Multi-vector embedding models give each query token its own opportunity to find a match in a document.[1]
Why it adds up
This makes them wonderfully expressive for search, but those document vectors add up quickly.[1]
A corpus with millions of documents can contain hundreds of millions of vectors![1]
At 4 bits per residual coordinate, 200 vectors of 128 dimensions require 12.8 KB of quantized residuals per document, or 12.8 GB across a million documents.[1]
Pooling each document to 50 vectors reduces that to 3.2 GB, at the same dimensionality and precision.[1]
The idea of merging similar vectors
Token pooling makes these representations smaller by merging similar token vectors.[1]
The more aggressively I compress them, however, the easier it becomes to lose something useful.[1]
Sources
- Token Pooling-Aware Training for Multi-Vector Embedding Models (huggingface.co · checked )
More articles
- LearningWhat a Direct GPU-to-Storage Path Is Meant to ImproveWhat NVIDIA's post says GPUDirect Storage is, what its data path is meant to improve and why configuration starts with understanding the environment.
- LearningWhy One Vector per Text Has LimitsWhat a Hugging Face post says a dense embedding model returns, what has to fit inside that vector and what a query with several requirements runs into.
- LearningWhat an Embedding IsWhat a Hugging Face post says an embedding is, what size an embedding model always produces and why embeddings are versatile.