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

Use Sampler for StaticWhisperPipeline #1713

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

eshiryae
Copy link
Contributor

@eshiryae eshiryae commented Feb 11, 2025

@github-actions github-actions bot added the category: whisper Whisper pipeline label Feb 11, 2025
@eshiryae eshiryae changed the title Sampler for StaticWhisperPipeline Use Sampler for StaticWhisperPipeline Feb 11, 2025
Comment on lines +668 to +671
std::vector<int64_t> chunk_init_tokens;
chunk_init_tokens.insert(chunk_init_tokens.end(), init_ids.begin(), init_ids.end());

SequenceGroup::Ptr sequence_group = std::make_shared<SequenceGroup>(0, chunk_init_tokens, config, 1);
Copy link
Contributor

@as-suvorov as-suvorov Feb 11, 2025

Choose a reason for hiding this comment

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

chunk_init_tokens looks redundant. Can't we pass init_ids directly?

return {false, output_tokens};
std::unordered_map<uint64_t, ov::genai::GenerationOutput> token = handle->read();
for (const auto& gen_token : token.begin()->second.generated_ids) {
if (streamer_ptr->put(gen_token)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

if (output_token == config.eos_token_id) {
break;
}
while (!sequence_group->has_finished() && !sequence_group->handle_dropped()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

handle_dropped is outdated, please, use
(!sequence_group->has_finished() && !sequence_group->handle_stopped() && !sequence_group->handle_cancelled()), example: https://github.com/openvinotoolkit/openvino.genai/blob/master/src/cpp/src/whisper/whisper.cpp#L107

return {true, output_tokens};
}
}
OPENVINO_ASSERT(sequence_group->get_finished_sequences().size() == 1u);
Copy link
Contributor

Choose a reason for hiding this comment

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

What situation can that there will be more than one sequence here?

Copy link
Collaborator

@TolyaTalamanov TolyaTalamanov Feb 12, 2025

Choose a reason for hiding this comment

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

Such cases not supported for StaticWhisper pipeline yet

@ilya-lavrenov ilya-lavrenov added this to the 2025.1 milestone Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants