Skip to content

Conversation

@marianotepper
Copy link
Contributor

This PR adds a new feature that uses quantized vectors for re-ranking. The quantization is computed on subvectors of each vector in the index, using a non-uniform quantizer.

…n OptimizationResult that facilitates error checking.
Copy link
Contributor

@jkni jkni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor nits/questions. Overall, looks quite good.

@marianotepper marianotepper requested a review from jkni December 30, 2024 23:02
@marianotepper
Copy link
Contributor Author

The changes requested/suggested by @jkni have been put in place.

Copy link
Contributor

@jkni jkni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor nit to discuss and then I think we can get this merged. Can you also add a brief mention of NVQ to the README.md section about reranking ("second pass" ...) as well as UPGRADING.md?

# Conflicts:
#	jvector-base/src/main/java/io/github/jbellis/jvector/graph/GraphIndexBuilder.java
#	jvector-base/src/main/java/io/github/jbellis/jvector/graph/similarity/BuildScoreProvider.java
#	jvector-base/src/main/java/io/github/jbellis/jvector/quantization/ImmutableBQVectors.java
#	jvector-base/src/main/java/io/github/jbellis/jvector/quantization/ImmutablePQVectors.java
#	jvector-base/src/main/java/io/github/jbellis/jvector/quantization/MutableBQVectors.java
#	jvector-base/src/main/java/io/github/jbellis/jvector/quantization/MutableCompressedVectors.java
#	jvector-base/src/main/java/io/github/jbellis/jvector/quantization/MutablePQVectors.java
#	jvector-base/src/main/java/io/github/jbellis/jvector/quantization/PQVectors.java
#	jvector-examples/src/main/java/io/github/jbellis/jvector/example/Bench.java
#	jvector-examples/src/main/java/io/github/jbellis/jvector/example/SiftSmall.java
#	jvector-tests/src/test/java/io/github/jbellis/jvector/quantization/TestProductQuantization.java
#	jvector-twenty/src/main/java/io/github/jbellis/jvector/vector/SimdOps.java
@jbellis
Copy link
Contributor

jbellis commented Jan 2, 2025

(Please use "squash and merge" when you commit.)

@marianotepper
Copy link
Contributor Author

README.md and UPGRADING.md are updated now.

Copy link
Contributor

@jkni jkni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. As Jonathan mentioned, please squash! Minor CI fix to clean up.

@marianotepper marianotepper merged commit e8d5c3c into main Jan 2, 2025
6 checks passed
marianotepper added a commit that referenced this pull request Jan 3, 2025
It solves the issue that @jkni caught when reviewing #374. It renders the parallel vector accesses during "encodeAll" thread safe.
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.

5 participants