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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whisper: fix asr pipeline with seq2seq assistant model #30726

Closed
wants to merge 4 commits into from

Conversation

gante
Copy link
Member

@gante gante commented May 9, 2024

What does this PR do?

Fixes #29869
Fixes #30407
Fixes #30611 (related PR: #30637)

The ASR pipeline was preparing the encoder outputs before generate (and not passing input_features), but that's not needed: the exact same preparation is done inside generate, as it is a hard requirement to generate with encoder-decoder models.

However, by not passing input_features, it was blocking the proper use of encoder-decoder assistants that used a different encoder output shape (= decoder input shape), and thus needed the inputs to run their own encoding step.

Contrarily to #30637, this fix relies on lowering the complexity of our codebase 馃懠

@HuggingFaceDocBuilderDev

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.

Copy link
Contributor

@kamilakesbi kamilakesbi left a comment

Choose a reason for hiding this comment

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

Hi @gante,

We pass the encoder output directly to generate when doing short form generation with Whisper, but it doesn't seem necessary indeed! @sanchit-gandhi WDYT ?

I can add the code modifications to #30637.

@gante
Copy link
Member Author

gante commented May 20, 2024

(diff included in #30637 )

@gante gante closed this May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants