-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
Add OnnxConfig for ConvBERT #16859
Add OnnxConfig for ConvBERT #16859
Conversation
The documentation is not available anymore as the PR was closed or merged. |
The conversion is working as demonstrated by the fact I successfully converted a base model and uploaded it on the hub. Check the model here Here is the command I have used: $ python -m transformers.onnx --model=mrm8488/convbert-base-spanish --feature=default onnx/
> Validating ONNX model...
> -[✓] ONNX model output names match reference model ({'last_hidden_state'})
> - Validating ONNX Model output "last_hidden_state":
> -[✓] (2, 8, 768) matches (2, 8, 768)
> -[✓] all values close (atol: 1e-05)
> All good, model saved at: onnx/model.onnx |
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.
Awesome job on pushing this to the Hub! We have a PR in |
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 your PR! LGTM with @lewtun 's nit.
732f875
to
52adc2d
Compare
I dreamed about this and wanted to give it a shot if I had time (spoiler: not in the past months) but someone did it!!! Btw the tests seem to pass! |
I saw on another onnx config contribution that I could add the model to onnx tests, is it mandatory ? |
Ah yes, well spotted! You can pick one of the checkpoints from here and add it to the test: https://huggingface.co/models?search=convbert This will ensure this export is tested as part of our daily CI with the slow tests :) |
52adc2d
to
6558325
Compare
Thanks for including the test case - looks great! |
* add OnnxConfig for ConvBert Co-authored-by: ChainYo <[email protected]>
What does this PR do?
I have added OnnxConfig for ConvBERT model. I have checked all features available (which are the same as DistilBERT), so the features list seems to be good.
Who can review?
Models: