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

Binary Quantization Support for pgvector HNSW Algorithm #389

Conversation

Sheharyar570
Copy link
Contributor

This update introduces binary vector quantization support to the pgvector HNSW algorithm within our benchmarking tool. The implementation includes binary vector quantization queries with an option for reranking.

New CLI and UI Options

  • reranking (boolean): Enables or disables reranking for quantized queries.
  • quantized_fetch_limit (integer): Specifies the number of rows to fetch for distance calculations between binary vectors before reranking.
  • reranking_metric (string): Chooses the distance metric for reranking, with options:
    • COSINE
    • L2
    • IP

@Sheharyar570
Copy link
Contributor Author

/assign @XuanYang-cn

@greenhal
Copy link
Contributor

This is a great addition to VectorDBBench. My only suggestion is would be to try to reduce the large section of duplicate code in pgvector with the filtered/unfiltered sql query definition. Lines 132-194 & 195-245, this code is identical except for the where clause.

@Sheharyar570
Copy link
Contributor Author

@greenhal I've refactored the code as you suggested and removed code duplication.

@sre-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: alwayslove2013, Sheharyar570
To complete the pull request process, please assign xuanyang-cn after the PR has been reviewed.
You can assign the PR to them by writing /assign @xuanyang-cn in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@alwayslove2013 alwayslove2013 merged commit d11330d into zilliztech:main Oct 29, 2024
4 checks passed
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.

4 participants