-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Where are sub-quantizers stored? #1516
Comments
In the line #53 of faiss/impl/productquantizer.h, |
You can find the example here |
It is in the field |
Thanks all for your answer :) It works for me now. Just a quick additional question, does every Voronoi cell in IVFPQ shares the same sub-quantizers?
and I get
Does that indicate we only have one set of sub-quantizers for every cell? So that during the search, we first do (query_vector - centroid_vector), and then use the remainder to determine the PQ distance in that cell. |
Yes there is a single set of subquantizers. but this is not implemented in Faiss. The memory overhead is big and it gives more accurate results, especially for recalls at higher ranks. |
Thank you for that :) Closing this problem |
Summary
Hi, I trained an IVFPQ index and didn't found where the fine-grained / sub quantizers, i.e, the quantizers for each Voronoi cells, are stored. As in the images below, the saved indexes only include a coarse-grained quantizer, and a PQ codebook (1B vector * (8byte code ID + 16 byte PQ code) = 24 GB).
If I list the attributes and methods of "index", there's no information about sub-quantizers as well. Where should I find it?
Running on:
Interface:
The text was updated successfully, but these errors were encountered: