-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
[Bugfix] Fix include prompt in stream response when echo=true #15233
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
[Bugfix] Fix include prompt in stream response when echo=true #15233
Conversation
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add 🚀 |
We hit this issue in our testing as well. I confirmed that this PR resolves the error and the changes look good to me! @fyuan1316 Could you add a test-case for this to ensure it doesn't break again in the future? |
This pull request has merge conflicts that must be resolved before it can be |
6ae5649
to
9de90da
Compare
@tjohnson31415 I've already added the test case in this PR. This should prevent future regressions. |
6fe2eff
to
3f40b08
Compare
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.
Thanks for adding the unit test!
The CI test failure with PIL.UnidentifiedImageError
looks unrelated 🤔...
One little simplification suggestion, but LGTM otherwise
3f40b08
to
967ec22
Compare
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.
Thanks. LGTM.
@@ -347,7 +360,7 @@ async def completion_stream_generator( | |||
out_logprobs = output.logprobs | |||
|
|||
if not delta_text and not delta_token_ids \ | |||
and not previous_num_tokens[i]: | |||
and not previous_num_tokens[i]: |
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.
let's revert the whitespace change
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.
Finally it's reverted 😊
3f40b08
to
4887a46
Compare
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.
LGTM. Thanks
/retest |
Head branch was pushed to by a user without write access
4887a46
to
26c9901
Compare
The test failure has an illegal memory access 😮. Hopefully another rebase will resolve that... Thanks for working on this fix @fyuan1316 ! Looking forward to having this merged! |
Agree. Thanks @fyuan1316 |
Signed-off-by: Yuan Fang <yuanfang@alauda.io>
26c9901
to
a26de83
Compare
@tjohnson31415 , @shuynh2017 : |
if is_text_tokens_prompt(request_prompt): | ||
prompt_text = request_prompt["prompt"] | ||
else: | ||
prompt_text = None |
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.
won't pre-commit complain about ternary operator here?
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.
lgtm
…roject#15233) Signed-off-by: Yuan Fang <yuanfang@alauda.io>
…roject#15233) Signed-off-by: Yuan Fang <yuanfang@alauda.io> Signed-off-by: avigny <47987522+avigny@users.noreply.github.com>
…roject#15233) Signed-off-by: Yuan Fang <yuanfang@alauda.io> Signed-off-by: Jinzhen Lin <linjinzhen@hotmail.com>
…roject#15233) Signed-off-by: Yuan Fang <yuanfang@alauda.io>
Hi @DarkLight1337
I'm currently trying to fix the issue of "Return prompt in stream response when echo is enabled." I'm not entirely sure if the changes are complete or correct, and I would greatly appreciate it if you could spare some time to review them and provide guidance. Thank you!
FIX #15119