Replies: 1 comment
-
You're asking a very good question, and you're absolutely right to pause at this term split. From your quote:
Exactly β and thatβs the key insight. So what you're observing is a classical optimization known as pre-computed codebook distances, where term 2 is factored out and stored ahead of time to reduce runtime compute. This works because:
You also asked:
Because each subquantizer (M) encodes one chunk of the vector, and each has its own table of distances to centroids (ksub). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In https://github.com/facebookresearch/faiss/blob/main/faiss/IndexIVFPQ.cpp#L361
/** Precomputed tables for residuals
*
*/
I don't quite understand the last sentence - This is faster when the length of the lists is > ksub * M. Is length of the lists means the length of posting list in each coarse centroid? The term 2 is not related with query x, so it can be computed when system initialized. So why it's faster when the length of the lists is > ksub * M?
Thank you for the help.
Beta Was this translation helpful? Give feedback.
All reactions