Repository navigation
Conversation
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.
Adds a native, opt-in PiPNN index backend to VectorSimilarity. After bulk insertion, callers explicitly build its graph; TopK queries then use beam search. Mutations invalidate the graph and queries fall back to exact search until rebuilt. Existing index defaults are unchanged.
This is implementation code, separate from the upstream benchmark PoC in #1122.
Scope
All calls on an index must be serialized, including queries. Redis Search schema support, tiered indexing, background rebuilds, other metrics/types, and parallel construction are outside this change. Persistence does not fsync the parent directory. The implementation uses native distance kernels and bounded scalar construction; it does not claim performance equivalence with upstream PiPNN.
Performance and rollout
The initial native ARM screen does not justify replacing HNSW. On 100k normalized DBpedia vectors, build time was 21.33 s versus HNSW's 60.00 s, but p95 query latency was 3.18 ms versus 0.85 ms at the lowest measured points above 95% recall. On DEEP, builds were 2.59 s versus 12.63 s and p95 was 0.83 ms versus 0.11 ms. Recall differs slightly between compared points; each backend/dataset had one build and a coarse ef sweep. PiPNN's peak build RSS was higher on both datasets.
Keep HNSW as the default. This draft provides a reviewable backend implementation; rollout still requires workload-specific recall/latency/rebuild-memory validation and embedding-application integration tests. Full conditions and raw results are in
docs/benchmarks/pipnn/.Validation