-
Notifications
You must be signed in to change notification settings - Fork 31.1k
[PoC] HF exporters #41992
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
base: main
Are you sure you want to change the base?
[PoC] HF exporters #41992
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. |
|
Currently all models (except a select few) are tested and pass the tests successfully !
skipped tests either:
|
… model types which is more user facing
|
[For maintainers] Suggested jobs to run (before merge) run-slow: aria, aya_vision, bamba, bart, bigbird_pegasus, biogpt, chameleon, cohere2_vision, colqwen2, ctrl, deepseek_vl, deepseek_vl_hybrid, emu3, eomt, evolla |
What does this PR do?
This is an attempt to standardize native transformers export support of an export backend (dynamo, onnx)
For now it works with encoder models (bert, vit, etc) which are the easiest, and decoder models (gpt2, llama) which require the creation of a pkv instance with real tensors. this step can be done by using the model's config but for simplicity I'm running a forward pass and retrieving the pkv from the outputs. Dynamic shapes can be passed by user or generated automatically by creating a dict with Dim.AUTO and letting torch infer which axes are dynamic.
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.