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

Fix TPOT calculation for streaming requests in benchmarking scripts #899

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ async def send_stream_request(
output_token_ids = tokenizer(output).input_ids
output_len = len(output_token_ids)
request_latency = (prompt_len, output_len, (request_end_time - request_start_time))
tpot_metric.observe((request_end_time - request_start_time) / output_len)
# Exclude first token for tpot calculation
tpot_metric.observe((request_end_time - ttft - request_start_time) / (output_len - 1))
if ttft is not None:
ttft_metric.observe(ttft)
prompt_length_metric.observe(prompt_len)
Expand Down
Loading