4 ms·
hey hn, supabase ceo here. This is an iteration of several things that we’ve developed to support Hugging Face. 1. Python adapters. The first is our python li
by kiwicopple 3y ago
hey hn, supabase ceo here.
This is an iteration of several things that we’ve developed to support Hugging Face.
1. Python adapters. The first is our python lib, Vecs [0], which now supports “adapters”. Adapters are simply a pipeline of transformations that an input goes through (for example: split the text into chunks, then turn it into an embedding). We’ve included support for Hugging Face sentence transforms to automatically download the models on first run, and then cache them for subsequent runs.
2. Deno support. I want to start by pointing out that most of the hard work to support Hugging Face in Javascript is through Joshua’s continued efforts on Transformers.js (Joshua is an employee at HF). To support this effort we’re rolling out support across all of the Supabase Edge Functions. We’ve started with sentence embeddings for now since that’s the most common use-case for pgvector. In the future we hope to attach a read-only disk of common HF models with our Edge Runtime - this will be accessible to all Edge Functions so they don't need to download the models (which means no cold-starts)
At the moment 98% of Supabase customers use OpenAI to create embeddings in pgvector. With today’s release we’re hoping to add more options, especially for situations where fewer dimensions are viable (for better pgvector performance[2])
A few of the supabase engineers will be in the comments to answer any questions, as well as Joshua from HF (@xenova on HN)
[0] Vecs: https://github.com/supabase/vecs/ https://github.com/supabase/vecs/
[1] Transformers.js: https://huggingface.co/docs/transformers.js/index https://huggingface.co/docs/transformers.js/index
[2] pgvector performance with lower dimensions: https://supabase.com/blog/fewer-dimensions-are-better-pgvector https://supabase.com/blog/fewer-dimensions-are-better-pgvect...