-
Notifications
You must be signed in to change notification settings - Fork 31.3k
Let transformers know when a model is being traced via jax.jit (torchax) #42611
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?
Conversation
9aa3291 to
a041420
Compare
Cyrilvallez
left a comment
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.
LGTM! Would just like to add it to the docstring as well if you don't mind! 🤗
a041420 to
266adfa
Compare
Rocketknight1
left a comment
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.
Yep, change looks good and after some internal discussion we're happy to approve!
tengomucho
left a comment
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.
Thanks for the contribution @qihqi !
|
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. |
|
CI issues are unrelated and seem to be transient connection timeouts - @cyril do you want to force merge, or will we just wait and rebase? |
4e56c0b to
544c760
Compare
done. |
What does this PR do?
transformers current recognizes when the PyTorch model is
being traced instead of executed, so it knows to not use untraceable ops (data-dependent ops).
However, currently it recognizes torchscript, fx trace, dynamo but does not recognize
jax.jitvia torchax.This PR adds detecting jax.jit.
Fixes google/torchax#56
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.
@vasqu @ArthurZucker @Cyrilvallez