Uncompressed vector embeddings
Starting with v1.33
, Weaviate enables 8-bit RQ quantization by default when creating new collections to ensure efficient resource utilization and faster performance. This behavior can be changed through the DEFAULT_QUANTIZATION
environment variable. Note that once enabled, quantization can't be disabled for a collection.
You can opt-out of using vector quantization to compress your vector data.
Disable compression for new collection
When creating the collection, you can choose not to use quantization through the collection definition:
- Python
from weaviate.classes.config import Configure, Property, DataType
client.collections.create(
name="MyCollection",
vector_config=Configure.Vectors.text2vec_openai(
quantizer=Configure.VectorIndex.Quantizer.none()
),
properties=[
Property(name="title", data_type=DataType.TEXT),
],
)
Additional considerations
Multiple vector embeddings (named vectors)
v1.24
Collections can have multiple named vectors. The vectors in a collection can have their own configurations, and compression must be enabled independently for each vector. Every vector is independent and can use PQ, BQ, RQ, SQ, or no compression.
Multi-vector embeddings (ColBERT, ColPali, etc.)
v1.30
Multi-vector embeddings (implemented through models like ColBERT, ColPali, or ColQwen) represent each object or query using multiple vectors instead of a single vector. Just like with single vectors, multi-vectors support PQ, BQ, RQ, SQ, or no compression.
During the initial search phase, compressed vectors are used for efficiency. However, when computing the MaxSim
operation, uncompressed vectors are utilized to ensure more precise similarity calculations. This approach balances the benefits of compression for search efficiency with the accuracy of uncompressed vectors during final scoring.
RQ supports multi-vector embeddings. Each token vector is rounded up to a multiple of 64 dimensions, which may result in less than 4x compression for very short vectors. This is a technical limitation that may be addressed in future versions.
Further resources
- Starter guides: Compression
- Reference: Vector index
- Concepts: Vector quantization
- Concepts: Vector index
Questions and feedback
If you have any questions or feedback, let us know in the user forum.