Skip to content
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 RemBERT ONNX config #20520

Merged
merged 2 commits into from Dec 5, 2022
Merged

Add RemBERT ONNX config #20520

merged 2 commits into from Dec 5, 2022

Conversation

hchings
Copy link
Contributor

@hchings hchings commented Dec 1, 2022

What does this PR do?

Add RemBERT ONNX config (part of #16308)

The max absolute difference between reference model and ONNX exported model is around 2e-05 in testings. I learned from other PRs that this discrepancy is within an acceptable range so I loosen the default atol.

Slow tests are passed (RUN_SLOW=1 pytest tests/onnx/test_onnx_v2.py -k "rembert").

I'm new to contributing to Transformers. If anyone can help me understand what is lacking, it would be appreciated!

Before submitting

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.

@lewtun & @chainyo for ONNX and @Iwontbecreative for RemBERT.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Dec 1, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Contributor

@chainyo chainyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @hchings, the PR looks excellent! Did you try to run tests locally?

RUN_SLOW=1 pytest tests/onnx/test_onnx_v2.py -k "rembert"

Could you also remove the Fixes #... before the link to the ONNX issue to avoid an auto-close from GitHub? Thanks a lot for your contribution!

@hchings
Copy link
Contributor Author

hchings commented Dec 1, 2022

Hi @hchings, the PR looks excellent! Did you try to run tests locally?

RUN_SLOW=1 pytest tests/onnx/test_onnx_v2.py -k "rembert"

Could you also remove the Fixes #... before the link to the ONNX issue to avoid an auto-close from GitHub? Thanks a lot for your contribution!

Yes, all slow tests passed for PyTorch locally. Should we add TensorFlow tests as well? My understanding is TF tests are needed only when TF has parity with PyTorch implementations. But correct me if I'm wrong.

@hchings hchings requested a review from chainyo December 2, 2022 01:37
Copy link
Contributor

@chainyo chainyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok looks good. Let's see wait on @lewtun.

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

@sgugger sgugger merged commit 87282cb into huggingface:main Dec 5, 2022
amyeroberts pushed a commit to amyeroberts/transformers that referenced this pull request Dec 7, 2022
* rembert onnx config

* formatting

Co-authored-by: Ho <erincho@bcd0745f972b.ant.amazon.com>
mpierrau pushed a commit to mpierrau/transformers that referenced this pull request Dec 15, 2022
* rembert onnx config

* formatting

Co-authored-by: Ho <erincho@bcd0745f972b.ant.amazon.com>
venkat-natchi pushed a commit to venkat-natchi/transformers that referenced this pull request Jan 22, 2023
* rembert onnx config

* formatting

Co-authored-by: Ho <erincho@bcd0745f972b.ant.amazon.com>
miyu386 pushed a commit to miyu386/transformers that referenced this pull request Feb 9, 2023
* rembert onnx config

* formatting

Co-authored-by: Ho <erincho@bcd0745f972b.ant.amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants