- 
                Notifications
    
You must be signed in to change notification settings  - Fork 140
 
Non-uniform vector quantization #374
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
Conversation
There was a problem hiding this 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.
        
          
                jvector-base/src/main/java/io/github/jbellis/jvector/graph/disk/NVQ.java
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                jvector-base/src/main/java/io/github/jbellis/jvector/graph/disk/OnDiskGraphIndexWriter.java
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                jvector-base/src/main/java/io/github/jbellis/jvector/optimization/LossFunction.java
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                jvector-base/src/main/java/io/github/jbellis/jvector/optimization/LossFunction.java
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                jvector-base/src/main/java/io/github/jbellis/jvector/optimization/NESOptimizer.java
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                jvector-base/src/main/java/io/github/jbellis/jvector/vector/VectorUtilSupport.java
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ...sts/src/test/java/io/github/jbellis/jvector/optimization/TestNaturalEvolutionStrategies.java
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                jvector-tests/src/test/java/io/github/jbellis/jvector/quantization/TestCompressedVectors.java
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                jvector-twenty/src/main/java/io/github/jbellis/jvector/vector/SimdOps.java
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                jvector-base/src/main/java/io/github/jbellis/jvector/vector/VectorUtilSupport.java
              
                Outdated
          
            Show resolved
            Hide resolved
        
      …in TestNaturalEvolutionStrategies.
| 
           The changes requested/suggested by @jkni have been put in place.  | 
    
There was a problem hiding this 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?
        
          
                jvector-base/src/main/java/io/github/jbellis/jvector/graph/disk/NVQ.java
              
                Outdated
          
            Show resolved
            Hide resolved
        
      …stull being taken into account
# 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
| 
           (Please use "squash and merge" when you commit.)  | 
    
| 
           README.md and UPGRADING.md are updated now.  | 
    
There was a problem hiding this 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.
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.