-
transformers.js
State-of-the-art Machine Learning for the web. Run 🤗 Transformers directly in your browser, with no need for a server!
-
doodle-dash
Doodle Dash, an ML-powered web game that runs completely in your browser, thanks to Transformers.js!
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
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 copies between CPU and GPU. We're working closely with the ORT team to fix these issues though!
- (20MB) Doodle Dash, an ML-powered sketch detection game: https://huggingface.co/spaces/Xenova/doodle-dash
… and many many more! Check out the Transformers.js demos collection for some others: https://huggingface.co/collections/Xenova/transformersjs-dem....
Models are cached on a per-domain basis (using the Web Cache API), meaning you don’t need to re-download the model on every page load. If you would like to persist the model across domains, you can create browser extensions with the library! :)
As for your last point, there are efforts underway, but nothing I can speak about yet!
I’m using it for a simple project: https://github.com/sroussey/ellmers
My plan is to test embedding and retrieval strategies for different RAG strategies to be used by a server or electron app.