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
add4b0ca
Unverified
Commit
add4b0ca
authored
Dec 14, 2025
by
Vensen
Committed by
GitHub
Dec 14, 2025
Browse files
[Bugfix][benchmarks] Fix input token calculation for rerank benchmark metrics (#30596)
Signed-off-by:
vensen
<
vensenmu@gmail.com
>
parent
ae88aada
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
vllm/benchmarks/serve.py
vllm/benchmarks/serve.py
+3
-1
vllm/entrypoints/pooling/score/protocol.py
vllm/entrypoints/pooling/score/protocol.py
+1
-0
vllm/entrypoints/pooling/score/serving.py
vllm/entrypoints/pooling/score/serving.py
+3
-1
No files found.
vllm/benchmarks/serve.py
View file @
add4b0ca
...
...
@@ -235,7 +235,9 @@ async def get_request(
def
calculate_metrics_for_embeddings
(
outputs
:
list
[
RequestFuncOutput
],
dur_s
:
float
,
selected_percentiles
:
list
[
float
]
outputs
:
list
[
RequestFuncOutput
],
dur_s
:
float
,
selected_percentiles
:
list
[
float
],
)
->
EmbedBenchmarkMetrics
:
"""Calculate the metrics for the embedding requests.
...
...
vllm/entrypoints/pooling/score/protocol.py
View file @
add4b0ca
...
...
@@ -120,6 +120,7 @@ class RerankResult(BaseModel):
class
RerankUsage
(
BaseModel
):
prompt_tokens
:
int
total_tokens
:
int
...
...
vllm/entrypoints/pooling/score/serving.py
View file @
add4b0ca
...
...
@@ -502,5 +502,7 @@ class ServingScores(OpenAIServing):
id
=
request_id
,
model
=
model_name
,
results
=
results
,
usage
=
RerankUsage
(
total_tokens
=
num_prompt_tokens
),
usage
=
RerankUsage
(
total_tokens
=
num_prompt_tokens
,
prompt_tokens
=
num_prompt_tokens
),
)
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