Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Are either int8 or fp8 vectors planned? #521

@xfalcox

Description

@xfalcox

Recently I've run a benchmark and recall test on the new halfvec and bit types, and they both yielded impressive results.

All my tests were run against public data on https://meta.discourse.org/, and testing which topics would be selected as the "Related Topics" we show at the end of a topic. Embeddings used bge-large-en-v1.5 computed via huggingface/text-embeddings-inference.

Our embeddings are all computed via bfloat16 already, so halfvec will reduce our storage costs by half while losing us nothing. It's literally free storage reductions.

On the bit front, a naive test simply replacing vectors for bits and using only bits with full scans without indexes, while had visible recall changes, the results were good enough that could be used as-is without most used batting an eye.

Since bit overperforms in our use case, that made me interested on checking how something in between would perform, namely either int8/fp8.

Either way, thank you a lot for the new types and continued work on pgvector.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions