Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
93d364da
Unverified
Commit
93d364da
authored
Sep 26, 2024
by
Pernekhan Utemuratov
Committed by
GitHub
Sep 26, 2024
Browse files
[Bugfix] Include encoder prompts len to non-stream api usage response (#8861)
parent
d9cfbc89
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
vllm/entrypoints/openai/serving_chat.py
vllm/entrypoints/openai/serving_chat.py
+2
-0
No files found.
vllm/entrypoints/openai/serving_chat.py
View file @
93d364da
...
...
@@ -726,6 +726,8 @@ class OpenAIServingChat(OpenAIServing):
assert
final_res
.
prompt_token_ids
is
not
None
num_prompt_tokens
=
len
(
final_res
.
prompt_token_ids
)
if
final_res
.
encoder_prompt_token_ids
is
not
None
:
num_prompt_tokens
+=
len
(
final_res
.
encoder_prompt_token_ids
)
num_generated_tokens
=
sum
(
len
(
output
.
token_ids
)
for
output
in
final_res
.
outputs
)
usage
=
UsageInfo
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment