-
-
Notifications
You must be signed in to change notification settings - Fork 12.1k
[Engine][Chore] use local variable and remove output var assignment #24554
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
Conversation
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.
Code Review
This pull request introduces two minor refactorings in the beam_search method. It caches tokenizer.eos_token_id in a local variable and removes an unnecessary intermediate variable for the RequestOutput. These changes improve code clarity and are functionally correct. I've added one suggestion to handle cases where a tokenizer might not have an EOS token defined, which would prevent incorrect behavior during beam search.
Signed-off-by: Guy Stone <guys@spotify.com>
6601b73 to
e2abadb
Compare
…llm-project#24554) Signed-off-by: Guy Stone <guys@spotify.com>
…llm-project#24554) Signed-off-by: Guy Stone <guys@spotify.com>
…llm-project#24554) Signed-off-by: Guy Stone <guys@spotify.com>
…llm-project#24554) Signed-off-by: Guy Stone <guys@spotify.com> Signed-off-by: xuebwang-amd <xuebwang@amd.com>
…llm-project#24554) Signed-off-by: Guy Stone <guys@spotify.com> Signed-off-by: xuebwang-amd <xuebwang@amd.com>
Purpose
Test Plan
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.