HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
huggingface
transformers.js
JavaScript2023–2026
huggingface / transformers.js

transformers.js

State-of-the-art Machine Learning for the web. Run 🤗 Transformers directly in your browser, with no need for a server!

17Distinct people
25Mentions
0Explicit recommenders
16.4KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

State-of-the-art Machine Learning for the web. Run 🤗 Transformers directly in your browser, with no need for a server!

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

Libreagi – Save OSS Models direct repository linkDebated

Commenters question the necessity of requiring an application to join a private BitTorrent tracker for preserving open-source models, arguing it hinders accessibility and contradicts the goal of common good. The project maintainers defend the restriction as standard practice to enforce seeding ratios and prevent malware, though some users suggest alternative public distribution methods.

27 readable replies · Supporting reply 1 · Supporting reply 2 · Supporting reply 3 · Supporting reply 4

Mentions over time

HN mentions by year25 dated mentions

Observed mentions: 2023-03-17 01:02:42 UTC to 2026-10-26 14:20:49 UTC.

02468102023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 10 mentions; 4 submissions, 6 comments20232024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 9 mentions; 3 submissions, 6 comments20242025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 3 mentions; 2 submissions, 1 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC1046
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC936
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC303
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC321

What Hacker News says

25 sources
I built a Chrome extension with one feature that transcribes audio to text in the browser using huggingface/transformers.js running the OpenAI Whisper model with WebGPU. It works perfect! Here is a list of examples of all the things you can do in the browser with webgpu for free. [0] The last thing in the world I want to do is listen or watch presidential social media posts, but, on the other hand, sometimes enormously stupid things are said which move the SP500 up or down $60 in a session. So this feature queries for new posts every minute, does ORC image to text and transcribe video audio to text locally, sends the post with text for analysis, all in the background inside a Chrome extension before notify me of anything economically significant. [0] https://github.com/huggingface/transformers.js/tree/main/exa... [1] https://github.com/ad
Read the rest
In OpenAI charges by the minute, so speed up your audio
Another very cool attribute of embeddings and embedding search is that they are resource cheap enough that you can perform them client side. ONNX models can be loaded and executed with transformer.js https://github.com/huggingface/transformers.js/ You can even build and statically host indices like hnsw for embeddings. I put together a little open source demo for this here https://jasonjmcghee.github.io/portable-hnsw/ (it's a prototype / hacked together approximation of hnsw, but you could implement the real thing) Long story short, represent indices as queryable parquet files and use duckdb to query them. Depending on how you host, it's either free or nearly free. I used Github Pages so it's free. R2 with cloudflare would only cost the size what you store (very cheap- no egress fees).
In Embeddings are underrated (2024)
Everything is open source with the exception of the LLM at the moment, which we'll get to. Here are all the tools: * postgres-new (https://github.com/supabase-community/postgres-new): The frontend. Apache 2.0 * PGlite (https://github.com/electric-sql/pglite): A WASM build of Postgres. Apache 2.0 * pg-gateway (https://github.com/supabase-community/pg-gateway): Postgres wire protocol for the server-side. MIT * transformers.js (https://github.com/xenova/transformers.js): Run Transformers directly in your browser
In Postgres.new: In-browser Postgres with an AI interface
hey HN, supabase ceo here. Full details here: https://supabase.com/blog/postgres-new This is a new service that we're experimenting with that uses PGLite[0], a WASM build of Postgres that runs in the browser. You might remember an earlier WASM build[1] that was around ~30MB. The Electric team [2] have gone one step further and created a complete build of Postgres that’s under 3MB. Their implementation is technically interesting. Postgres is normally multi-process - each client connection is handed to a child process by the postmaster process. In WASM there’s limited/no support for process forking and threads. Fortunately, Postgres has a relatively unknown built-in “single user mode” [3] primarily designed for bootstrapping a new database and disaster recovery. Single-user mode only supports a minimal cancel REPL, so PGlite adds wire-proto
Read the rest
col support which enables parametrised queries etc. We have created https://postgres.new as an experiment. You can think of it like a love-child between Postgres and ChatGPT: in-browser Postgres sandbox with AI assistance. You can spin up as many new Postgres databases as you want because they all live inside your browser. We pair PGlite with an LLM (currently GPT-4o) and give it full reign over the database with unrestricted permissions. This is an important detail - giving an LLM full autonomy means that it can run multiple operations back-to-back: any SQL errors from Postgres are fed back to the language model so that it can have a few more attempts to solve the problem. Since it’s in-browser it’s low risk. Some other features include: - CSV upload: you can upload a CSV and it will automatically create a Postgres table which you can query with natural language. - Charts: you can ask the LLM to create a chart with the data and change the colors of the charts. - RAG / pgvector: PGLite supports pgvector, so you can ask the LLM to create embeddings for RAG. The site uses transformers.js [4] to create embeddings inside the browser. We’re working on an update to deploy your databases and serve them from S3 using pg-gateway [5]. We expect to have a read-only deployments ready by the end of the week. You can access them using any postgres-compatible tool (eg: psql). Everything is open source. A huge shout-out to the Electric team who have been a pleasure to build with. [0] PGLite: https://github.com/electric-sql/pglite [1] Postgres-wasm: https://supabase.com/blog/postgres-wasm [2] Electric: https://electric-sql.com/ [3] Single user mode: https://www.postgresql.org/docs/current/app-postgres.html#AP... [4] transformers.js: https://github.com/xenova/transformers.js [5] pg-gateway: https://github.com/supabase-community/pg-gateway
In Postgres.new

Postgres.new: In-browser Postgres with an AI interface

hey HN, supabase ceo here This is a new service that we're experimenting with that uses PGLite[0], a WASM build of Postgres that runs in the browser. You might remember an earlier WASM build[1] that was around ~30MB. The Electric team [2] have gone one step further and created a complete build of Postgres that’s under 3MB. Their implementation is technically interesting. Postgres is normally multi-process - each client connection is handed to a child process by the postmaster process. In WASM there’s limited/no support for process forking and threads. Fortunately, Postgres has a relatively unknown built-in “single user mode” [3] primarily designed for bootstrapping a new database and disaster recovery. Single-user mode only supports a minimal cancel REPL, so PGlite adds wire-protocol support which enables parametrised queries etc. We have
Read the rest
created https://postgres.new as an experiment. You can think of it like a love-child between Postgres and ChatGPT: in-browser Postgres sandbox with AI assistance. You can spin up as many new Postgres databases as you want because they all live inside your browser. We pair PGlite with an LLM (currently GPT-4o) and give it full reign over the database with unrestricted permissions. This is an important detail - giving an LLM full autonomy means that it can run multiple operations back-to-back: any SQL errors from Postgres are fed back to the language model so that it can have a few more attempts to solve the problem. Since it’s in-browser it’s low risk. Some other features include: - CSV upload: you can upload a CSV and it will automatically create a Postgres table which you can query with natural language. - Charts: you can ask the LLM to create a chart with the data and change the colors of the charts. - RAG / pgvector: PGLite supports pgvector, so you can ask the LLM to create embeddings for RAG. The site uses transformers.js [4] to create embeddings inside the browser. We’re working on an update to deploy your databases and serve them from S3 using pg-gateway [5]. We expect to have a read-only deployments ready by the end of the week. You can access them using any postgres-compatible tool (eg: psql). Everything is open source. A huge shout-out to the Electric team who have been a pleasure to build with. [0] PGLite: https://github.com/electric-sql/pglite [1] Postgres-wasm: https://supabase.com/blog/postgres-wasm [2] Electric: https://electric-sql.com/ [3] Single user mode: https://www.postgresql.org/docs/current/app-postgres.html#AP... [4] transformers.js: https://github.com/xenova/transformers.js [5] pg-gateway: https://github.com/supabase-community/pg-gateway
366 points · Open discussion
This looks really promising and thanks for sharing! I've actually been looking into this exact type of functionality lately, for anyone else I'm just going to drop some other projects in this area (also if anyone, including OP, want's to chime in on how they compare- i know there's all sorts of trade-offs ie. the similarity algo chosen, one of these relies on wasm, etc): https://github.com/tantaraio/voy https://github.com/nitaiaharoni1/vector-storage https://github.com/danielivanovz/indexed-vector-store https://github.com/yusufhilmi/client-vector-search Another area I've looked into briefly is also trying to generate vector embeddings fully in-browser. I know there will likely be tradeoffs with dimensionality / overall accuracy/performance but having a semi-decent way to do this in-browser would be awesome. This project only runs in node
Read the rest
(but there's an issue that talks about how it might be modified to run in-browser): https://github.com/Anush008/fastembed-js Looks like transformers.js supports embeddings in-browser: https://github.com/xenova/transformers.js/releases/tag/2.1.0 https://github.com/pinecone-io/semantic-search-example/blob/... Also it appears the client-vector-search supports both embeddings & vector indexing https://github.com/yusufhilmi/client-vector-search Hope this helps others looking into this stuff!
In Show HN: TinkerBird – A Chrome-native vector database
We have some other WebGPU demos, including: - WebGPU embedding benchmark: https://huggingface.co/spaces/Xenova/webgpu-embedding-benchm... - Real-time object detection: https://huggingface.co/spaces/Xenova/webgpu-video-object-det... - Real-time background removal: https://huggingface.co/spaces/Xenova/webgpu-video-background... - WebGPU depth estimation: https://huggingface.co/spaces/Xenova/webgpu-depth-anything - Image background removal: https://huggingface.co/spaces/Xenova/remove-background-webgp... You can follow the progress for full WebGPU support in the v3 development branch (https://github.com/xenova/transformers.js/pull/545). To answer your question, while there are certain ops missing, the main limitation at the moment is for models with decoders... which are not very fast (yet) due to inefficient buffer reuse and many redundant c
Read the rest
opies between CPU and GPU. We're working closely with the ORT team to fix these issues though!
In Transformers.js – Run Transformers directly in the browser
This library is so cool. It makes spinning up a quick demo incredibly easy - I've used it in Observable notebooks a few times: - CLIP in a browser: https://observablehq.com/@simonw/openai-clip-in-a-browser - Image object detection with detra-resnet-50: https://observablehq.com/@simonw/detect-objects-in-images The size of the models feels limiting at first, but for quite a few applications telling a user with a good laptop and connection that they have to wait 30s for it to load isn't unthinkable. The latest releases adds binary embedding quantization support which I'm really looking forward to trying out: https://github.com/xenova/transformers.js/releases/tag/2.17....
In Transformers.js – Run Transformers directly in the browser

Showing the 15 most recent of 25 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.