You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Release v1.24.0 successfully supports exporting a ModernBERT model to ONNX; however, this support does not extend to enabling optimizations via the --optimize flag in optimum-cli.
I'm not sure how much needs to go into enabling this in a more formal capacity, but a very brief attempt by me locally at simply adding modernbert in:
with the former mapping to "bert" and the latter mapping to NormalizedTextConfig seemed to allow me to export the model with optimizations. In my brief testing after that I didn't notice any glaring issues with the output and observed some expected speedups.
Motivation
I would like to export an optimized ONNX version of my ModernBERT model.
Your contribution
I'd be happy to submit a PR if given more information on how this support is typically added.
The text was updated successfully, but these errors were encountered:
Feature request
Release v1.24.0 successfully supports exporting a ModernBERT model to ONNX; however, this support does not extend to enabling optimizations via the
--optimize
flag inoptimum-cli
.I'm not sure how much needs to go into enabling this in a more formal capacity, but a very brief attempt by me locally at simply adding
modernbert
in:optimum/optimum/onnxruntime/utils.py
Lines 101 to 149 in afff2fa
and
optimum/optimum/utils/normalized_config.py
Lines 233 to 294 in afff2fa
with the former mapping to
"bert"
and the latter mapping toNormalizedTextConfig
seemed to allow me to export the model with optimizations. In my brief testing after that I didn't notice any glaring issues with the output and observed some expected speedups.Motivation
I would like to export an optimized ONNX version of my ModernBERT model.
Your contribution
I'd be happy to submit a PR if given more information on how this support is typically added.
The text was updated successfully, but these errors were encountered: