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 mobilebert onnx configs #17029

Merged
merged 8 commits into from
May 9, 2022
Merged

Conversation

manandey
Copy link
Contributor

@manandey manandey commented May 1, 2022

What does this PR do?

This PR adds MobileBert OnnxConfig to make this model available for conversion. #16308

Who can review?

@lewtun @LysandreJik

Anyone in the community is free to review the PR once the tests have passed.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented May 1, 2022

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

@chainyo
Copy link
Contributor

chainyo commented May 1, 2022

Hi @manandey thanks for the PR, it looks really clean. Did you try to convert one MobileBERT model with this config?

It could be nice to upload a converted MobileBERT model of your choice to the ONNXConfig for all if you have time.

Copy link
Member

@lewtun lewtun 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 this clean PR @manandey 🤗 ! I've left some comment for small things we need to change, but this is a great start!

Could you also please confirm that the slow tests pass by running:

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

src/transformers/onnx/features.py Outdated Show resolved Hide resolved
@manandey
Copy link
Contributor Author

manandey commented May 3, 2022

Hi @lewtun, I tried to address the fixes you had suggested, and the tests are passing after running RUN_SLOW=1 pytest tests/onnx/test_onnx_v2.py -s -k "mobilebert" . :)

Copy link
Member

@lewtun lewtun 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 iterating and checking that the tests pass @manandey 🤗 ! The last thing I suggest is rebasing your branch on main to incorporate a refactoring we just merged that orders all the model names alphabetically in features.py.

src/transformers/onnx/features.py Show resolved Hide resolved
src/transformers/onnx/features.py Outdated Show resolved Hide resolved
Copy link
Member

@lewtun lewtun left a comment

Choose a reason for hiding this comment

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

Thank you for iterating on this @manandey 🚀 ! It all looks good to me, so gently pinging @sgugger for final approval

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 a lot for your PR!

@sgugger sgugger merged commit dc3645d into huggingface:main May 9, 2022
@manandey manandey deleted the onnx_configs_update branch May 10, 2022 07:13
nandwalritik pushed a commit to nandwalritik/transformers that referenced this pull request May 10, 2022
* update docs of length_penalty

* Revert "update docs of length_penalty"

This reverts commit 466bf48.

* add mobilebert onnx config

* address suggestions

* Update auto.mdx

* Update __init__.py

* Update features.py
Narsil pushed a commit to Narsil/transformers that referenced this pull request May 12, 2022
* update docs of length_penalty

* Revert "update docs of length_penalty"

This reverts commit 466bf48.

* add mobilebert onnx config

* address suggestions

* Update auto.mdx

* Update __init__.py

* Update features.py
elusenji pushed a commit to elusenji/transformers that referenced this pull request Jun 12, 2022
* update docs of length_penalty

* Revert "update docs of length_penalty"

This reverts commit 466bf48.

* add mobilebert onnx config

* address suggestions

* Update auto.mdx

* Update __init__.py

* Update features.py
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.

5 participants