-
-
Notifications
You must be signed in to change notification settings - Fork 444
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
[WIP] πππ Transformers.js V3 πππ #545
base: main
Are you sure you want to change the base?
Conversation
Requires dynamic imports
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? |
@xenova For some models, the performance may be a blocker. Since model downloads can be quite large, I wonder if there should be a way for web developers to know their machine performance class for running a model without downloading it completely first. I believe this would involve running the model code with zeroed-out weights, which would still require buffer allocations but would allow the web app to catch out-of-memory errors or such. The model architecture would still needed to generate shaders, but this be much smaller than model weights. Essentially, knowing the model architecture and testing with empty weights would allow for assessing performance capability without downloading the full model. I thought I could use |
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:onnxruntime-web
β 1.17.0). Closes:getModelJSON
fails with a bundler (see reproduction)Β #366PretrainedModel
,PretrainedTokenizer
, andProcessor
types. In a similar way to how the pipeline API has conditional types, we'll add the same for the other classes accessible by users.topk
->top_k
parameter.transpose
->permute
AutoProcessor
class, which uses image processor and tokenizerHow 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.