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 table quantization option for pgvector #427

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lucagiac81
Copy link
Contributor

This PR adds a table quantization option for pgvector.

  • The table_quantization_type option controls quantization of data as it is loaded into the database.
  • This is in addition to the existing quantization_type option which controls quantization of data in an index.

Quantizing data as it is loaded enables storage savings if the original float vectors do not need to be preserved for other purposes. For example, halfvec quantization could be used in both the table and index, reducing the size of the table and eliminating the need for conversions.

table_quantization_type supports the same quantization options as quantization type: none, halfvec, bit.
Most combinations of the two options are supported, with some exceptions.

  • If table_quantization_type = bit, then quantization type is forced to bit as well, as it does not make sense to convert bit vectors in the table to vector or halfvec in an index.
  • Reranking is only supported if quantization_type = bit and table_quantization_type is vector or halfvec.

@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

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.

3 participants