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 get_max_new_tokens() insted of max_new_tokens field when stopping… #1417

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

michalkulakowski
Copy link

… generation

@github-actions github-actions bot added the category: sampling Sampling / Decoding algorithms label Dec 20, 2024
@@ -105,7 +105,7 @@ class Sampler::GroupBeamSearcher {
bool done = false;

int64_t finish(Beam beam, const ov::genai::GenerationConfig& sampling_params);
void is_done(const ov::genai::GenerationConfig& sampling_params);
void is_done(const ov::genai::GenerationConfig& sampling_params, size_t prompt_len);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we can include prompt_len information in Group members during object construction and avoid passing it as a parameter in this method.

Copy link
Contributor

@ilya-lavrenov ilya-lavrenov left a comment

Choose a reason for hiding this comment

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

Not all places inside src/cpp are changed

@mzegla
Copy link
Collaborator

mzegla commented Dec 20, 2024

One more thing - I believe max_length is now loaded from generation config. Isn't it a model property that is not meant to be a per generation configuration? @michalkulakowski I know you have logic to read that value in OVMS now. Maybe we could move it here and make it a pipeline member. This way it could be used in both OVMS and standalone GenAI app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: sampling Sampling / Decoding algorithms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants