supabase / vecs

Postgres/pgvector Python Client
https://supabase.github.io/vecs/latest
Apache License 2.0
219 stars 33 forks source link

how to index a table with 4096 dimension vectors? #92

Closed legaltextai closed 2 months ago

legaltextai commented 2 months ago

Is it possible? the default indexing with hnsw does not permit more than 2k dimensions. thank you

olirice commented 2 months ago

an indexing maximum of 2k dimensions is a restriction of pgvector

for performance reasons you most likely would not want embeddings of that size In some cases, like OpenAI models you can make use of them being matryoshka embeddings to reduce the dimensionality with very little loss of accuracy

Here's a link to the blog post about that

legaltextai commented 2 months ago

Thank you Oliver