---
title: "Hugging Face is now supported in Supabase"
description: "Supabase adds first-class Hugging Face support for generating embeddings stored in pgvector, as an open-source, self-hostable alternative to OpenAI's text-embedding-ada-002."
url: "https://swe.quest/articles/hugging-face-is-now-supported-in-supabase-b922ce506c4fa31d"
canonical: "https://supabase.com/blog/hugging-face-supabase"
source: "Supabase"
published: "2023-08-07"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 7
tags: ["vector-search","postgres","serverless","python","javascript"]
---

# Hugging Face is now supported in Supabase

A post on [Supabase](https://swe.quest/sources/supabase.md), published 2023-08-07, 7 min read, Announcement. Original: [https://supabase.com/blog/hugging-face-supabase](https://supabase.com/blog/hugging-face-supabase)

## Summary

Supabase adds first-class Hugging Face support for generating embeddings stored in pgvector, as an open-source, self-hostable alternative to OpenAI's text-embedding-ada-002. The Python vecs client gains "adapters" that chunk text and embed it automatically on upsert and query. Edge Functions can run Transformers.js inference in Deno, and small models can even run in the browser and query pgvector through PostgREST and RLS. Supabase recommends lower-dimension models such as gte-small for cheaper storage and faster retrieval, and notes current limits: 2-6s cold starts from model downloads, and no turnkey audio/image decoding in Deno.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Vector search](https://swe.quest/tags/vector-search.md) (Data & databases)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)
- [Python](https://swe.quest/tags/python.md) (Languages)
- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)

## Prerequisites

- vector embeddings ([easy posts on RAG & retrieval](https://swe.quest/tags/rag.md?difficulty=easy))
- Postgres basics ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))

## Keywords

Supabase, Hugging Face, pgvector, Transformers.js, vecs, gte-small, Deno, Supabase Edge Functions

## Related posts

- [AI Inference now available in Supabase Edge Functions](https://swe.quest/articles/ai-inference-now-available-in-supabase-edge-functions-9d09d3bcda534938.md): Supabase · 2024-04-16 · Medium · 5 min read · Serverless, Inference & serving, Vector search, LLMs
  Supabase Edge Functions gain a built-in Supabase.ai.Session API for running AI inference in a few lines of code, starting with gte-small embeddings for storage in pgvector and experimental, invite-only Llama and Mistral LLMs with streaming responses.
- [Storing OpenAI embeddings in Postgres with pgvector](https://swe.quest/articles/storing-openai-embeddings-in-postgres-with-pgvector-19a5d03614f86fc6.md): Supabase · 2023-02-06 · Medium · 11 min read · Vector search, PostgreSQL, RAG & retrieval, LLMs
  pgvector adds a vector data type and distance operators (Euclidean \<-\>, negative inner product \<#\>, cosine \<=\>) to Postgres, so OpenAI text-embedding-ada-002 embeddings (1536 dimensions) can be stored and queried for similarity directly in the database.
- [ChatGPT plugins now support Postgres & Supabase](https://swe.quest/articles/chatgpt-plugins-now-support-postgres-supabase-db9d10a95a8d96b9.md): Supabase · 2023-05-25 · Medium · 7 min read · RAG & retrieval, Vector search, PostgreSQL, LLMs
  Supabase contributed Postgres and Supabase datastore providers to OpenAI's ChatGPT Retrieval Plugin, storing text-embedding-ada-002 embeddings in pgvector.
- [Supabase Vecs: a vector client for Postgres](https://swe.quest/articles/supabase-vecs-a-vector-client-for-postgres-06f6cf65595a4da8.md): Supabase · 2023-05-29 · Medium · 4 min read · Vector search, PostgreSQL, Python
  Vecs is a Python client that makes Postgres with the pgvector extension behave like a dedicated vector store, handling collection (table) creation, indexing, upserts, and similarity queries by cosine, L2, or max inner product with a jsonb-backed metadata filter DSL.
- [Automatic Embeddings in Postgres](https://swe.quest/articles/automatic-embeddings-in-postgres-41612b12257af4ee.md): Supabase · 2025-04-01 · Medium · 6 min read · PostgreSQL, Vector search, RAG & retrieval, Queues & messaging
  Supabase moves embedding generation coordination into Postgres.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
