timescale/pgvectorscale

Is pgvector's `halfvec` dtype supported?

rsomani95 opened this issue · 3 comments

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?

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

@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.

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.