feat: add IVF_HNSW_RQ vector index#7806
Draft
ddupg wants to merge 1 commit into
Draft
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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
IVF_HNSW_RQacross the Rust, Python, Java, JNI, namespace, metadata, and distributed-index surfacesExact build vectors are removed from the storage batch before the auxiliary index file is written. Reopen and query paths therefore depend only on persisted HNSW and RaBitQ data and do not use vector reconstruction fallback.
Benchmark
Controlled synthetic benchmark: 100,000 rows, 32 dimensions, 32 queries, k=10, 4 IVF partitions, all partitions probed, 5-bit RaBitQ, shared centroids and rotation.
At equal recall (
ef=100), IVF_HNSW_RQ reduced mean latency by 15.2% (1.179x speedup). Atef=50, it lost 0.625 recall percentage points and reduced mean latency by 27.3% (1.376x speedup). In this small controlled workload, graph construction was about 14.7x slower and the index was about 4.21x larger. These are microbenchmark results, not production throughput claims.Command:
cargo test --release -p lance --features slow_tests test_ivf_hnsw_rq_benchmark -- --nocaptureTesting
cargo test -p lance ivf_hnsw_rq -- --nocapture(8 passed)cargo test -p lance test_merge_existing_hnsw_segments_rebuilds_graph -- --nocapture(4 passed: FLAT/PQ/SQ/RQ)cargo check -p lance-index --testscargo check -p lance --testscargo check -p lance-namespace-impls --testscargo clippy --all --tests --benches -- -D warningscargo fmt --all -- --checkuv run pytest python/tests/test_vector_index.py::test_create_reopen_and_query_ivf_hnsw_rq_indexuv run make lintJNITest#testIvfHnswRqIndexParamsandVectorIndexTest#testCreateIvfHnswRqIndex