Skip to content
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

Experiment with VQ coarse quantization for PQ #345

Open
jbellis opened this issue Jul 11, 2024 · 0 comments
Open

Experiment with VQ coarse quantization for PQ #345

jbellis opened this issue Jul 11, 2024 · 0 comments

Comments

@jbellis
Copy link
Owner

jbellis commented Jul 11, 2024

CAGRA performs compression with two stages:
Vector Quantization (VQ), where kmeans is applied to the full-dimensional vectors to create a codebook of coarse cluster centers

Product Quantization (PQ), where the closest VQ centroid is subtracted from each vector before quantizing the "residuals" with PQ

It looks like this is motivated by the fact that IVF-PQ uses the coarse centers for the IVF stage, and after that, hey, they had a hammer and this was a nail. Still, it might be worth applying to DiskANN-style PQ as well, it does seem to improve accuracy in my brief experiments with the CAGRA codebase. Not immediately obvious to me what the effect on speed would be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant