Unverified Commit 5b6fe23d authored by Kuntai Du's avatar Kuntai Du Committed by GitHub
Browse files

[Bugfix][Benchmark] Make sure the output length > 0 when testing prefill workload. (#20786)


Signed-off-by: default avatarKuntaiDu <kuntai@uchicago.edu>
Co-authored-by: default avatargemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
parent f0c98cae
...@@ -324,6 +324,9 @@ class RandomDataset(BenchmarkDataset): ...@@ -324,6 +324,9 @@ class RandomDataset(BenchmarkDataset):
input_low = int(real_input_len * (1 - range_ratio)) input_low = int(real_input_len * (1 - range_ratio))
input_high = int(real_input_len * (1 + range_ratio)) input_high = int(real_input_len * (1 + range_ratio))
output_low = int(output_len * (1 - range_ratio)) output_low = int(output_len * (1 - range_ratio))
# Ensure the lower bound for output length is at least 1 to prevent
# sampling 0 tokens, which can cause request failures.
output_low = max(output_low, 1)
output_high = int(output_len * (1 + range_ratio)) output_high = int(output_len * (1 + range_ratio))
# Add logging for debugging # Add logging for debugging
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment