-
Notifications
You must be signed in to change notification settings - Fork 1.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
integrate quantized data to storages #1311
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
* review api * wip: refactor quantization integrations * wip: refactor quantization integrations * wip: fmt * include quantization into snapshot * fmt
generall
approved these changes
Mar 3, 2023
generall
added a commit
that referenced
this pull request
Mar 15, 2023
* integrate quantized data to storages * revert gitignore * are you happy clippy * quantize in optimizer * provide flag * fix segfault * skip quantization flag, update scores * use quantization flag * are you happy fmt * use quantization flag * quantized search test * are you happy fmt * refactor test, refactor scorer choosing * are you happy fmt * run quantization on segment builder * decrease testing parameters * simplify segment * update version * remove use_quantization flag * provide quantization config * quantization version up * euclid dist * add euclid test * saveload * fix initialization bugs * quantization lib version up * fix arm build * refactor scorer selecting * quant lib version up * are you happy fmt * are you happy fmt * are you happy clippy * add save/load test for simple storage * add comments * quantiles * quantization mmap * remove f32 * mmap test * fix mmap slice * fix mmap test * use chunks for quantization storage * fix build * are you happy fmt * update quantization library * update quantization lib * update quantization lib * integrate api changes * are you happy fmt * change quantization api * additional checks in tests * update quantization version * fix unit tests * add quantization to storage config * use quantization for all cardinality search cases * Integrate quantization suggestions 2 (#1520) * review api * wip: refactor quantization integrations * wip: refactor quantization integrations * wip: fmt * include quantization into snapshot * fmt --------- Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is an integration of the quantization library into Qdrant:
https://github.com/qdrant/quantization
Quantization is a simplifying of vector data. It's helpful for reducing memory usage and scoring performance.
Quantization is enabled while segment creation uses a separate quantization config. For now, the config has only an
enable
flag.Quantized data is contained in RAM only, no mmap for quantized data for now. Quantized data is used for HNSW indexing and for HNSW search. Any search without HNSW index (plain search, exact search, etc) doesn't use quantized data.
For increasing accuracy, the user can disable quantized data using the
ignore_quantization
flag in search parameters. Because HNSW index is built using quantized data,ignore_quantization
can just increase accuracy but not fix it to the original data accuracy.If the search uses quantized data, final scores will be recalculated using the original data.
For memmap storage, there is RAM copy for deleted flags if quantization is enabled. Quantization on RAM is not effective when deleted flags are memmapped.
Perf and acc tests on real and random datasets are reported here:
https://www.notion.so/qdrant/7bit-quantization-in-hnsw-9f0467b5010849dcb359d0da93d844e0
All Submissions:
New Feature Submissions:
cargo fmt
command prior to submission?cargo clippy
command?Changes to Core Features: