News for hackers. Stuff that matters.
Re:Storing OpenAI embeddings in Postgres with pgvector by freeqaz on Tuesday February 07, 2023 @12:01AM (#34688969)
Do you have any examples that come to mind for this? I'd love to understand what other models exist and what Redis extensions exist to compare embeddings.
Re:Storing OpenAI embeddings in Postgres with pgvector by qigtyofhp on Tuesday February 07, 2023 @12:59AM (#34689275)
This will load the transformer models from Hugging Face (their models have a similar architecture to OpenAI embedding models): https://www.sbert.net/docs/pretrained_models.html

Redis has approximate nearest-neighbors vector similarity search: https://redis-py.readthedocs.io/en/stable/examples/search_ve...

Generate the embeddings on a rented GPU, push to Redis then do a similarity search. Store vectors in Redis using ndarray.tobytes()