-
Couldn't load subscription status.
- Fork 25.6k
1 Bit Centroids into 4 Bit Rescored #131895
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
Conversation
| // FIXME: do l2normalize here? | ||
| final float[] scratchTarget = new float[targetQuery.length]; | ||
| System.arraycopy(targetQuery, 0, scratchTarget, 0, targetQuery.length); | ||
| if (fieldInfo.getVectorSimilarityFunction() == COSINE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why we weren't normalizing for COSINE here previously; bug maybe?
| } | ||
| CentroidIterator centroidIterator = getCentroidIterator(fieldInfo, entry.numCentroids, entry.centroidSlice(ivfCentroids), target); | ||
|
|
||
| final int numOversampled = Math.min((int) (nProbe * NPROBE_OVERSAMPLE), entry.numCentroids()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be add this computation in DefaultIVFVectors reader and pass nProbe to the method getCentroidIterator?. This is an implementation detail of the strategy you are implementing and should not leak here.
…asticsearch into bbq_quantizing_rescoring
Quantizing all centroids at a 1 bit level and then re-quantizing a subset at a 4 bit level. Seems to show nice improvements and likely will help with scaling but we need to run larger datasets to be sure.
Part of exploring #131234
main vs 1bit rescore