-
Notifications
You must be signed in to change notification settings - Fork 205
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: use Sampler #1615
Whisper pipeline: use Sampler #1615
Conversation
} | ||
} | ||
|
||
std::pair<ov::genai::EncodedResults, bool> decode(std::shared_ptr<ov::genai::WhisperDecoder> decoder, |
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.
std::pair<ov::genai::EncodedResults, bool> decode(std::shared_ptr<ov::genai::WhisperDecoder> decoder, | |
std::pair<ov::genai::EncodedResults, bool> decode(const std::shared_ptr<ov::genai::WhisperDecoder>& decoder, |
const ov::Tensor& encoder_hidden_state, | ||
const std::shared_ptr<ov::genai::StreamerBase> streamer_ptr, | ||
ov::genai::Sampler& sampler, | ||
ov::genai::SequenceGroup::Ptr sequence_group, |
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.
ov::genai::SequenceGroup::Ptr sequence_group, | |
const ov::genai::SequenceGroup::Ptr& sequence_group, |
const float* logits_data = logits.data<const float>() + batch_offset + sequence_offset; | ||
|
||
int64_t out_token = std::max_element(logits_data, logits_data + vocab_size) - logits_data; | ||
float max_logit = logits_data[out_token]; |
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.
float max_logit = logits_data[out_token]; |
Not used
top_p: if set to float < 1, only the smallest set of most probable tokens with probabilities that add up to top_p or higher are kept for generation. | ||
top_k: the number of highest probability vocabulary tokens to keep for top-k-filtering. | ||
do_sample: whether or not to use multinomial random sampling that add up to `top_p` or higher are kept. | ||
num_return_sequences: the number of sequences to generate from a single prompt. |
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.
rng_seed
is missing. Although it's not Whisper's fault because it's missing in the parent config as well. Can you add it, possible in a separate PR
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.
Sure, will do
Ticket: 152889
Closes #1164