-
Notifications
You must be signed in to change notification settings - Fork 786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🚀🚀🚀 Transformers.js V3 🚀🚀🚀 #545
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Hey! This is great. Is this already in alpha? |
Team, is there any tentative time to release this v3 alpha ??? |
I can't wait anymore :) Please update me when it will be released! |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Hi everyone! Today we released our first WebGPU x Transformers.js demo: The WebGPU Embedding Benchmark (online demo). If you'd like to help with testing, please run the benchmark and share your results! Thanks! |
@xenova can this bench pick the GPU 1 instead of 0? For the laptops with dGPU |
Not currently, but this is being worked on here: microsoft/onnxruntime#19857. We will add support here once ready. |
@beaufortfrancois - I've added the source code for the video background removal demo. On my device, I get ~20fps w/ WebGPU support (w/ fp32 since fp16 is broken). Here's a screen recording (which drops my fps to ~14): webgpu-modnet.mp4
|
You rock. Thanks! It's a cool demo! 👍 I've been wondering how we could improve it:
|
src/utils/devices.js
Outdated
@@ -0,0 +1,3 @@ | |||
/** | |||
* @typedef {'cpu'|'gpu'|'wasm'|'webgpu'|null} DeviceType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, what is 'gpu'
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's meant to be a "catch-all" for the different ways that the library can be used with GPU support (not just in the browser with WebGPU). The idea is that it will simplify documentation, as transformers.js will select the best execution provider depending on the environment. For example, DML/CUDA support in onnxruntime-node (see microsoft/onnxruntime#16050 (comment))
Of course, this is still a work in progress, so it can definitely change!
Co-authored-by: Joshua Lochner <[email protected]>
Let's gooo 🚀 🚀 🚀 Awesome work!!! |
I nearly thought it would never happen 🙈 An amazing achievement and thank you for your persistence! |
🔥 🚀 |
WOOHOO!!! Congrats!! WebGPU all the things! |
This is a huge milestone🎉 Thank you for all the fantastic work in this great project! |
🚀 🚀 🚀 |
👍🥳
|
In preparation for Transformers.js v3, I'm compiling a list of issues/features which will be fixed/included in the release.
onnxruntime-web
to 1.17.0).onnxruntime-web
→ 1.17.0). Closes:getModelJSON
fails with a bundler (see reproduction) #366topk
->top_k
parameter.transpose
->permute
Useful commands:
npm version prerelease --preid=alpha -m "[version] Update to %s"
How to use WebGPU
First, install the development branch
Then specify the
device
parameter when loading the model. Here's example code to get started. Please note that this is still a WORK IN PROGRESS, so the following usage may change before release.