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

Speed up ScalarQuantization by selecting quantiles together #13918

Open
HoustonPutman opened this issue Oct 15, 2024 · 0 comments · May be fixed by #13919
Open

Speed up ScalarQuantization by selecting quantiles together #13918

HoustonPutman opened this issue Oct 15, 2024 · 0 comments · May be fixed by #13919

Comments

@HoustonPutman
Copy link
Contributor

Description

Currently in ScalarQuantizer, ScalarQuantizer.fromVectorsAutoInterval() will issue 4 calls (per to scratch-batch, basically len(vector)/20) Selector.select() and ScalarQuantizer.fromVectors() will issue 2 calls. All of these 4/2 calls use the same vectors, just asking for different k values. If we use a multi-select algorithm, instead of separate select algorithms, we can speed up these calls, especially ScalarQuantizer.fromVectorsAutoInterval() which is repeating a lot of logic.

The size of the list to select from is practically 20*vector_dimensions, so this greater speed ups will be observed with larger dimensionality. (Or if ScalarQuantizer.SCRATCH_SIZE is ever increased)

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

Successfully merging a pull request may close this issue.

1 participant