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

Is pgvector's halfvec dtype supported? #106

Open
rsomani95 opened this issue Jun 27, 2024 · 4 comments
Open

Is pgvector's halfvec dtype supported? #106

rsomani95 opened this issue Jun 27, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@rsomani95
Copy link

rsomani95 commented Jun 27, 2024

I have a table with fp16 embeddings:

\d+ table;


              Column              |           Type           |
----------------------------------+--------------------------+
embedding                         | halfvec(640)             |
...

But when I try to build the index on using CREATE INDEX ON table USING diskann (embedding);, I run into the following error:

ERROR:  data type halfvec has no default operator class for access method "diskann"
HINT:  You must specify an operator class for the index or define a default operator class for the data type.

Are fp16 vectors not yet supported?

@cevian cevian added the enhancement New feature or request label Jul 1, 2024
@cevian
Copy link
Collaborator

cevian commented Jul 1, 2024

Fp16 is not yet supported. We will consider this feature request during our planning, or you are welcome to submit a PR

@npip99
Copy link

npip99 commented Aug 26, 2024

@cevian Small request that would be nice (If possible), would be to support 4k dimensions if/when FP16 is supported.

OpenAI's text-embedding-3-large would then be able to fit.

@cho-thinkfree-com
Copy link

Halfvec is likely to work very well when a database has to store and process a lot of vector data without losing too much precision.

@tjgreen42
Copy link
Contributor

Note that we are already using quantization to compress vectors in the index, so query performance would likely not be boosted much by using f16. (Storage costs in the main table would be reduced, of course).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants