Add ONNX export optimization support for ModernBERT#2208
Conversation
|
Any news? Would be really helpful! |
|
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. |
|
Are there updates on the matter? |
|
can you please add it to testing as well |
|
I'll take a look - apologies
…On Wed, Apr 23, 2025, 2:37 AM Ilyas Moutawwakil ***@***.***> wrote:
@amas0 <https://github.com/amas0>
—
Reply to this email directly, view it on GitHub
<#2208 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3SOHZEEOLVAWZ7RKFKAYT224YKZAVCNFSM6AAAAABYNTTGO6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMRTGIYTQMBWGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
*IlyasMoutawwakil* left a comment (huggingface/optimum#2208)
<#2208 (comment)>
@amas0 <https://github.com/amas0>
—
Reply to this email directly, view it on GitHub
<#2208 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3SOHZEEOLVAWZ7RKFKAYT224YKZAVCNFSM6AAAAABYNTTGO6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMRTGIYTQMBWGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
@IlyasMoutawwakil I believe this change should do it? Please advise if not. |
|
It works well on ModernBERT, thanks @amas0 ! |
|
Still waiting on integration of this bit, @IlyasMoutawwakil - should be good to go? |
|
Thanks or iterating, can you please fix the code quality, with |
|
Hmmm. I'm at a bit of a loss here. I see the failing code quality check, but I can't recreate on my local machine. Trying to recreate locally, I've done: # In the cloned repo
uv venv -p 3.9.22 # matches the Python version in the check
source .venv/bin/activate
uv pip install -e '.[quality]'
make stylewhich gives: $ make style
black .
All done! ✨ 🍰 ✨
213 files left unchanged.
ruff check . --fixAny ideas? Confirmed the version numbers match up on python and package versions for the formatters. |
What does this PR do?
Fixes #2177 where ModernBERT support for exporting to ONNX format was added but optimizations not fully enabled.
Minor change that adds
modernbertto necessary configuration management objects. In local tests, optimizations provided noticeable speedups with identical results to non-optimized model.Who can review?
@fxmarty, @echarlaix, @JingyaHuang, @michaelbenayoun