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

Whisper Example on ORT master #293

Closed
sspintel opened this issue May 23, 2023 · 2 comments · Fixed by #374
Closed

Whisper Example on ORT master #293

sspintel opened this issue May 23, 2023 · 2 comments · Fixed by #374

Comments

@sspintel
Copy link

sspintel commented May 23, 2023

The documentation specifies that we still use a specific nightly build of ORT to optimize the Whisper model. However, the dummy input issue of microsoft/onnxruntime#15936 and microsoft/onnxruntime@e518933 is blocking execution of the optimized model through the OpenVINO Execution Provider for the same reason i.e, OpenVINO model compilation removes any dummy inputs in the graph but since it is present in the Olive optimized model (through the ORT 1.15 nightly), it fails to go through. Hence, OVEP requires the fixes for the dummy input issue in ORT master.

When I use ORT master to optimize Whisper through Olive, I get this error

out = model(inputs.encoder_input_ids, inputs.encoder_attention_mask, inputs.decoder_input_ids) AttributeError: 'WhisperEncoderDecoderInitInputs' object has no attribute 'encoder_attention_mask'

@jambayk
Copy link
Contributor

jambayk commented May 26, 2023

Thanks for opening this issue. There was a recent change in the ORT that makes the user_script.py in the whisper example incompatible with the nightly version. The user script only works with ORT version up to version 1.15.0 and the specific version of ORT nightly in the example was for 1.15.0dev.

I have updated the README and dependencies to version 1.15.0 in this PR #305

If needed, we could update the user script to support ORT versions > 1.15.0.

@sspintel
Copy link
Author

sspintel commented Jun 2, 2023

Hi @jambayk

Thanks for the response. Is it possible to update the user script as you suggested to support ORT > 1.15?

jambayk added a commit that referenced this issue Jun 23, 2023
## Describe your changes
This PR adds support for the latest ORT version and multilingual
support.

Also added transformer optimization pass in the `cpu,int8` config. It
was previously ommited due to a bug in ORT which was already resolved in
version `1.15.0`.

We currently don't have tests for the latest ORT and multilingual
support since there are no publically available ort-nightly builds. Will
look into this in the future.

Fixes: #293 
Fixes: #341 

## Checklist before requesting a review
- [ ] Add unit tests for this change.
- [ ] Make sure all tests can pass.
- [ ] Update documents if necessary.
- [ ] Format your code by running `pre-commit run --all-files`
- [ ] Is this a user-facing change? If yes, give a description of this
change to be included in the release notes.

## (Optional) Issue link
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