Open hugy718 opened 4 days ago
Thanks for your question! These experiments actually make sense in the context of these experiments.
First, the dataset is very small and everything fits in cache. In that situation, compressing vectors by using quantization or dimensionality reduction will barely yield any gains. Increasing the number of vectors is the first step to simulate any real workload.
Second, the dimensionality is relatively low, with only 128 dimensions. Here, dimensionality reduction might not give you noticeable gains. In most modern use cases, vectors are produced by embedding models that use a high-dimensionality The most common range today is probably 512-1536 dimensions. In this range, you will see a significant improvement from using LeanVec.
Third (and this is related tomy previous point), you are using a random dataset. This statistical distribution has a flat spectra and cannot be easily compressed using linear dimensionality reduction (or can be done while carrying too much loss in search accuracy). The statistical distribution of the vectors produced by embedding models has different characteristics that make it more amenable for reducing the dimensionality.
All in all, if you try a dataset produced by a modern embedding method with more dimensions and containing more vectors, you will then see the right acceleration: LeanVec < LVQ < uncompressed.
Hi, I am using the cpp example in the documentation with the test dataset
svs/data/test_dataset
, but LVQ and Leanvec indexes takes longer to complete the search. Can anyone help me to check what may have caused this issue?running lvq8 vs uncompressed:
runing leanvec
Measured search duration
Search duration: Leanvec > lvq > uncompressed ?
Build flags: