-
Notifications
You must be signed in to change notification settings - Fork 192
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 pipeline: implement 'initial_prompt' and 'hotwords' parameters #1378
Whisper pipeline: implement 'initial_prompt' and 'hotwords' parameters #1378
Conversation
OPENVINO_ASSERT(!config.initial_prompt.has_value(), "'initial_prompt' parameter is not supported on NPU device."); | ||
OPENVINO_ASSERT(!config.hotwords.has_value(), "'hotwords' parameter is not supported on NPU device."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TolyaTalamanov
I wanted to add support of both parameters to static pipeline, but realized it could affect first token performance.
We need to increase decoder input size from 4 to say half of max window (448/2):
https://github.com/openvinotoolkit/openvino.genai/pull/1378/files#diff-d12890f3f3d40e33557c7aa7fd3b13593d022cb3921484837159ccf9a6e48d4aR548
reshape_to_static(decoder_model, 4, 4, last_hidden_state_shape);
-> reshape_to_static(decoder_model, 448/2, 448/2, last_hidden_state_shape);
As I understand this could reduce performance in case of neither initial_prompt
nor hotwords
are set.
Adds:
initial_prompt
parameter (faster_whisper reference) - injects initial prompt tokens as a previous transcription into the first processing windowhotwords
parameter (faster_whisper reference) - injects hotwords tokens as a previous transcription into the all processing windowsCloses #1150
Ticket: 156888