Skip to content

ORTOptimizer for wav2vec2-bert #2221

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

Closed
aconeil opened this issue Apr 2, 2025 · 1 comment · Fixed by aconeil/optimum#1 · May be fixed by #2232
Closed

ORTOptimizer for wav2vec2-bert #2221

aconeil opened this issue Apr 2, 2025 · 1 comment · Fixed by aconeil/optimum#1 · May be fixed by #2232

Comments

@aconeil
Copy link

aconeil commented Apr 2, 2025

Feature request

This is a request to make the ORTOptimizer available for wav2vec2-bert.

Motivation

Currently when trying to convert a fine-tuned wav2vec2-bert model to an optimized onnx model, the following error is raised:
NotImplementedError: Tried to use ORTOptimizer for the model type wav2vec2-bert, but it is not available yet. Please open an issue or submit a PR at https://github.com/huggingface/optimum.

Your contribution

I am fairly new to the world of ONNX models, but willing to help by answering any questions about the issue.

@IlyasMoutawwakil
Copy link
Member

IlyasMoutawwakil commented Apr 8, 2025

please open a PR to add support for optimizing the model, it is as simple as adding it here:
https://github.com/huggingface/optimum/blob/main/optimum/onnxruntime/utils.py#L112
and testing it of course.

The idea is that onnxruntime provides a set of optimizations for some specific models and we apply them on similar models. I guess in this case ("wav2vec2-bert") a similar model is "bert", so its optimization should be applied.

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 a pull request may close this issue.

2 participants