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 quantization option for pgvector with support for halfvec #366

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

lucagiac81
Copy link
Contributor

@lucagiac81 lucagiac81 commented Aug 30, 2024

This PR adds a quantization option for pgvector.

The option is quantization_type, following the same naming as for pgvecto_rs. The option is added to both the web UI and CLI.

The supported values are none and halfvec.

  • For the CLI, not specifying the option is equivalent to selecting none.
  • When halfvec is selected, scalar FP16 quantization is applied when creating the index (HNSW or IVFFlat).
  • Additional quantization types can be added in the future (e.g., bit vectors).

@lucagiac81 lucagiac81 marked this pull request as ready for review August 30, 2024 18:53
@lucagiac81
Copy link
Contributor Author

/assign @XuanYang-cn

@lucagiac81
Copy link
Contributor Author

Resolved conflicts due to recently merged PR #362

@sre-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: alwayslove2013, lucagiac81
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 b364fe3 into zilliztech:main Sep 2, 2024
4 checks passed
@jkatz
Copy link
Contributor

jkatz commented Sep 4, 2024

FWIW I think this is a good start - we should add in binary quantization support as well. However, because BQ requires reranking, there may be some additional work to do here.

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