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

feat: add --disable-prompt-logprobs argument #95

Merged
merged 2 commits into from
Aug 14, 2024

Conversation

tjohnson31415
Copy link
Contributor

Description

Adds a new --disable-prompt-logprobs boolean argument that defaults to False. When set to True, prompt_logprobs will always be set to None in the SamplingParams, regardless of the incoming request parameters, disabling all usage of prompt logprobs.

This flag is being added because computation of prompt logprobs can add latency to request processing and there are a couple of bugs/crashes that occur when using prompt logprobs.

How Has This Been Tested?

Manually tested to verify that the flag can be set via env var and that it has the desired effect to not return prompt logprobs (but still returns logprobs on generated tokens).

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

Signed-off-by: Travis Johnson <tsjohnso@us.ibm.com>
Signed-off-by: Travis Johnson <tsjohnso@us.ibm.com>
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.08%. Comparing base (1642b30) to head (4b4bd4e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #95      +/-   ##
==========================================
+ Coverage   62.02%   62.08%   +0.06%     
==========================================
  Files          21       21              
  Lines        1214     1216       +2     
  Branches      213      213              
==========================================
+ Hits          753      755       +2     
  Misses        386      386              
  Partials       75       75              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@njhill njhill self-requested a review August 14, 2024 03:38
@prashantgupta24 prashantgupta24 added this pull request to the merge queue Aug 14, 2024
Merged via the queue into main with commit 7cd77d1 Aug 14, 2024
3 checks passed
@prashantgupta24 prashantgupta24 deleted the disable-prompt-logprobs-flag branch August 14, 2024 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants