pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: xfalcox (@xfalcox) <noreply+xfalcox@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #521: Are either int8 or fp8 vectors planned?
Date: Mon, 25 Nov 2024 16:44:24 +0000
Message-ID: <gh-pgvector-pgvector-521-c2498523377@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-521@github.com>
References: <gh-pgvector-pgvector-521@github.com>

> I have considered using bits, but due to their low precision. Based on the content written by @xfalcox
( https://github.com/pgvector/pgvector/issues/521#issuecomment-2061634539 ), the Top-5 hit rate for BIT is calculated to be approximately below 60%.

@cho-thinkfree-com @discourse we are now using halfvec column types with bitvector indexes. We overcapture using the bit index, and then do a final search using half precision as suggested by the readme. The saved storage in indexing was quite considerable.

> (Assuming each value in the vector is between 0 and 1:)
>
>    Create an index by converting each vector value into 0 or 1 based on a threshold of 0.25.
>    Create another index with a threshold of 0.50.
>    Create yet another index with a threshold of 0.75.
>    During a search, use these indexes to perform searches and combine the results to rank them.

See TimeScaleDB statistical binary quantization. They apply quantization using the mean value of each dimension.

A `binary_quantize(VECTOR, THRESHOLD)` would be cool to help experiment with that, but you can do this in your app code too.


view thread (24+ messages)  latest in thread

Message-ID: <gh-pgvector-pgvector-521-c2498523377@github.com>
Permalink:  ../gh-pgvector-pgvector-521-c2498523377@github.com/

 · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox