-
Notifications
You must be signed in to change notification settings - Fork 487
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
Allow sending directly torch/tf/np dtype for generating dummy inputs #2117
base: main
Are you sure you want to change the base?
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. |
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 ! This looks better and more flexible ! I left a couple of comments
tests are failing, seems like some string inputs are still being passed around
|
What does this PR do?
Currently always via git push
DTYPE_MAPPER
:optimum/optimum/utils/input_generators.py
Line 73 in 4a7cb29
It would be nice to directly accept the different dtypes of frameworks. Eg. I could load a model in
torch.bfloat16
in this case, I would like to define the dummy inputs dtype withmodel.dtype
instead of going through a reversed dict of theDTYPE_MAPPER
.