Skip to content

Commit

Permalink
OAI: Add stream to gen params
Browse files Browse the repository at this point in the history
Good for logging.

Signed-off-by: kingbri <[email protected]>
  • Loading branch information
bdashore3 committed Mar 21, 2024
1 parent 69e41e9 commit 56fdfb5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions backends/exllamav2/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,7 @@ def generate_gen_sync(
# Some options are too large, so log the args instead
log_generation_params(
max_tokens=max_tokens,
stream=kwargs.get("stream"),
**gen_settings_log_dict,
token_healing=token_healing,
auto_scale_penalty_range=auto_scale_penalty_range,
Expand Down
5 changes: 4 additions & 1 deletion endpoints/OAI/types/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ class CommonCompletionRequest(BaseSamplerRequest):
)

def to_gen_params(self):
extra_gen_params = {"logprobs": self.logprobs}
extra_gen_params = {
"stream": self.stream,
"logprobs": self.logprobs,
}

return super().to_gen_params(**extra_gen_params)

0 comments on commit 56fdfb5

Please sign in to comment.