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

Temporary PR to add to the next PR #4

Closed
wants to merge 1 commit into from
Closed

Temporary PR to add to the next PR #4

wants to merge 1 commit into from

Conversation

gsolard
Copy link
Collaborator

@gsolard gsolard commented Jul 3, 2024

No description provided.

@maxDavid40
Copy link
Collaborator

New behavior to vllm (0.5.0.post1) completions endpoints (same for chat/completions) !

Usage info not return by default, need to add on the body request the stream_options informations: "stream_options" : {"include_usage": True}

Also, we need to modify benchmark_llm_serving.query_profiles.query_functions.query_functions

  if len(json_chunk['choices']) > 0:
    data = json_chunk['choices'][0]['text']
    output.generated_text += data
  if "usage" in json_chunk:
    if json_chunk['usage'] is not None:
      output.prompt_length = json_chunk['usage']['prompt_tokens']

⚠️ Be careful, the attribute stream_options not implemented in 0.4.3 in openAi_server.protocols, the response will be a 422 if you add in body the stream_options key

@gsolard gsolard closed this Aug 1, 2024
@gsolard
Copy link
Collaborator Author

gsolard commented Aug 1, 2024

Changes done in PR #5

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.

2 participants