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

Add hierarchical structure to the graph index #402

Open
wants to merge 91 commits into
base: main
Choose a base branch
from
Open

Conversation

marianotepper
Copy link
Collaborator

@marianotepper marianotepper commented Mar 13, 2025

This PR introduces a hybrid HNSW-DiskANN graph. From HNSW, we take the idea of using multiple layers. This adds robustness to particularly hard datasets. Each layer is a Vamana graph. The upper layers reside in memory while the base layer resides on disk (in DiskANN style). It also enable using a single layer. In that case, it is a plain Vamana graph.

Jonathan Ellis and others added 30 commits February 7, 2025 17:21
# Conflicts:
#	jvector-base/src/main/java/io/github/jbellis/jvector/graph/disk/CommonHeader.java
#	jvector-base/src/main/java/io/github/jbellis/jvector/graph/disk/OnDiskGraphIndex.java
#	jvector-base/src/main/java/io/github/jbellis/jvector/graph/disk/OnDiskGraphIndexWriter.java
#	jvector-base/src/main/java/io/github/jbellis/jvector/quantization/BQVectors.java
#	jvector-examples/src/main/java/io/github/jbellis/jvector/example/Bench.java
#	jvector-examples/src/main/java/io/github/jbellis/jvector/example/Grid.java
#	jvector-examples/src/main/java/io/github/jbellis/jvector/example/IPCService.java
#	jvector-tests/src/test/java/io/github/jbellis/jvector/graph/Test2DThreshold.java
#	jvector-tests/src/test/java/io/github/jbellis/jvector/graph/disk/TestOnDiskGraphIndex.java
@marianotepper marianotepper self-assigned this Mar 13, 2025
@marianotepper marianotepper requested review from tlwillke and jkni March 13, 2025 22:00
@marianotepper marianotepper marked this pull request as ready for review March 17, 2025 22:24
@marianotepper
Copy link
Collaborator Author

marianotepper commented Mar 18, 2025

A point worth noting is that we recently updated the file format for graphs to V4 in main (#400). Since this PR should be merged fairly quickly after that one and V4 has not been included in a release yet, I opted for not bumping up the file version to V5 but to just update V4 instead. This was to avoid an unnecessary proliferation of versions that will complicate backwards compatibility in the future.

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

Successfully merging this pull request may close these issues.

2 participants