Skip to content

Fix whisper hook generate decorator arguments passing#2873

Merged
Wovchena merged 1 commit intoopenvinotoolkit:masterfrom
as-suvorov:as/fix_llm_bench_wrong_generate_args_pass
Oct 21, 2025
Merged

Fix whisper hook generate decorator arguments passing#2873
Wovchena merged 1 commit intoopenvinotoolkit:masterfrom
as-suvorov:as/fix_llm_bench_wrong_generate_args_pass

Conversation

@as-suvorov
Copy link
Copy Markdown
Collaborator

@as-suvorov as-suvorov commented Oct 20, 2025

Description

Fix whisper hook generate decorator arguments passing
Transformer change introduced in: huggingface/transformers#35753 (4.54.1 release)
Tested with 4.53, 4.55 transformers

Ticket: 174921

Checklist:

  • This patch fully addresses the ticket.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes incorrect argument passing in the Whisper hook's generate decorator and corrects the use case class reference for speech-to-text models. The changes address a bug where the generate method wrapper was explicitly declaring an attention_mask parameter instead of accepting all keyword arguments dynamically.

Key Changes:

  • Corrected the import and usage of UseCaseSpeech2Text instead of UseCaseTextToSpeech in speech-to-text model handling
  • Fixed the my_generate wrapper function to properly forward all keyword arguments to the underlying generate method

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tools/llm_bench/llm_bench_utils/ov_utils.py Corrected import and class reference from UseCaseTextToSpeech to UseCaseSpeech2Text for proper speech-to-text model validation
tools/llm_bench/llm_bench_utils/hook_forward_whisper.py Fixed my_generate wrapper to accept all keyword arguments instead of explicitly declaring attention_mask, ensuring proper argument forwarding

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions github-actions bot added the category: llm_bench Label for tool/llm_bench folder label Oct 20, 2025
@as-suvorov as-suvorov added this to the 2025.4 milestone Oct 20, 2025
@Wovchena Wovchena enabled auto-merge October 20, 2025 15:00
@as-suvorov
Copy link
Copy Markdown
Collaborator Author

build_jenkins

@Wovchena
Copy link
Copy Markdown
Collaborator

I think the problem is in OV's Jenkins. We have a PR in a queue hanging for 20 hours. I'll contact @akladiev. But it's worth trying once more :)

@Wovchena
Copy link
Copy Markdown
Collaborator

build_jenkins

@Wovchena Wovchena added this pull request to the merge queue Oct 21, 2025
Merged via the queue into openvinotoolkit:master with commit c894846 Oct 21, 2025
97 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: llm_bench Label for tool/llm_bench folder Code Freeze

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants