-
Notifications
You must be signed in to change notification settings - Fork 197
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
base: master
Are you sure you want to change the base?
Use get_max_new_tokens() insted of max_new_tokens field when stopping… #1417
Conversation
402bba1
to
5d527f0
Compare
@@ -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); |
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.
I think we can include prompt_len
information in Group
members during object construction and avoid passing it as a parameter in this method.
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.
Not all places inside src/cpp
are changed
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. |
That makes sense to me. @ilya-lavrenov what do you think? |
I suppose it depends on the model:
Looks like max_model_length (which is config.max_position_embeddings, example is https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct/blob/main/config.json#L13) and max_length from generation_config.json are different things, are not they? Maybe we can have similar behavior for GenAI and add some defaults similar to HF? @Wovchena @pavel-esir @as-suvorov what is your opinion? |
… generation