Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Hugging Face is now supported in Supabase (supabase.com)
27 points by todsacerdoti on Aug 7, 2023 | hide | past | favorite | 2 comments



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/

[1] Transformers.js: https://huggingface.co/docs/transformers.js/index

[2] pgvector performance with lower dimensions: https://supabase.com/blog/fewer-dimensions-are-better-pgvect...


Hi everyone, Joshua from Hugging Face (and the creator of Transformers.js) here.

Starting with embeddings, we hope to simplify and improve the developer experience when working with embeddings. Supabase already has great support for storage and retrieval of embeddings (thanks to pgvector) [0], so it feels like this collaboration was long overdue!

Open-source embedding models are both smaller and more performant [1] than closed-source alternatives, so it's quite surprising that 98% of Supabase applications currently use OpenAI's text-embedding-ada-002 [2]. Probably because it is just easier to access? Well... that changes today! You can also iterate extremely quickly: experiment with and choose the model that works best for you (no vendor lock-in)! In fact, since the article was written, a new leader has just appeared on top of the MTEB leaderboard [3].

I look forward to answering any questions you have!

[0] https://supabase.com/vector [1] https://huggingface.co/spaces/mteb/leaderboard [2] https://supabase.com/blog/hugging-face-supabase [3] https://huggingface.co/BAAI/bge-large-en




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: