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

Fix Huggingface server stopping criteria #3659

Merged
merged 2 commits into from
Apr 30, 2024

Conversation

cmaddalozzo
Copy link
Contributor

What this PR does / why we need it:
This PR fixes two issues:

  1. Stopping criteria was not working properly for encoder-decoder models as it was not accounting for the fact that they do not include input tokens in the generated output
  2. Streamed responses were not getting the finish_reason set properly do to the stopping criteria not being passed into the streamer object

Type of changes
Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • Have you added unit/e2e tests that prove your fix is effective or that this feature works?
  • Has code been commented, particularly in hard-to-understand areas?
  • Have you made corresponding changes to the documentation?

Release note:

NONE

Re-running failed tests

  • /rerun-all - rerun all failed workflows.
  • /rerun-workflow <workflow name> - rerun a specific failed workflow. Only one workflow name can be specified. Multiple /rerun-workflow commands are allowed per comment.

Signed-off-by: Curtis Maddalozzo <cmaddalozzo@bloomberg.net>
Signed-off-by: Curtis Maddalozzo <cmaddalozzo@bloomberg.net>
Copy link
Contributor

@spolti spolti left a comment

Choose a reason for hiding this comment

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

/lgtm

@yuzisun
Copy link
Member

yuzisun commented Apr 30, 2024

/approve

Copy link

oss-prow-bot bot commented Apr 30, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cmaddalozzo, spolti, yuzisun

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yuzisun yuzisun merged commit f717e12 into kserve:master Apr 30, 2024
57 of 58 checks passed
asd981256 pushed a commit to asd981256/kserve that referenced this pull request May 14, 2024
* Encoder-decoder models do not include input tokens in their output

Signed-off-by: Curtis Maddalozzo <cmaddalozzo@bloomberg.net>

* Pass stopping criteria into streamer

Signed-off-by: Curtis Maddalozzo <cmaddalozzo@bloomberg.net>

---------

Signed-off-by: Curtis Maddalozzo <cmaddalozzo@bloomberg.net>
Signed-off-by: asd981256 <asd981256@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants