Repository navigation
Add native QGKMeans and RaBitQKMeans clustering - #120
Merged
Merged
Conversation
- Add SymphonyQG graph assignment and flat RaBitQ assignment with shared Lloyd training, spherical support, and optional exact final assignment. - Reuse graph and query scratch storage, dispatch centroid accumulation, and use blocked GEMM for exact assignment without a full distance matrix. - Replace FAISS clustering in examples with native clustering methods and add C++ file-based clustering tools. - Add comparisons against FAISS, regression tests, and a unified clustering guide with a SuperKMeans reference.
This file contains hidden or 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
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.
Summary
Add native C++ and Python k-means clustering so IVF and HNSW workflows no longer require FAISS for clustering.
RaBitQKMeanswith flat RaBitQ assignment for small cluster counts, inspired by SuperKMeans, andQGKMeanswith SymphonyQG graph assignment for larger counts. Both share Lloyd training, float64 centroid accumulation, spherical support, and result semantics.compare_with_faiss.py.docs/docs/clustering.md, with regression coverage for both APIs and the example workflows.No new production dependency or saved-index format change. FAISS remains an optional comparison dependency.
Testing
RABITQ_ENABLE_NATIVE_OPTIMIZATION=OFF. All 72 before/after split parity cases matched bit-for-bit.Full repository clang-tidy remains to be run before merging. ARM64, macOS, and Windows were not tested locally.