Skip to content

Commit

Permalink
[Misc] Fix sampling from sonnet for long context case (vllm-project#9235
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Imss27 authored Oct 11, 2024
1 parent f990bab commit 94bf9ae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions benchmarks/benchmark_serving.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ def sample_sonnet_requests(
# Sample the rest of lines per request.
sampled_requests: List[Tuple[str, int, int]] = []
for _ in range(num_requests):
sampled_lines = "".join(
prefix_lines +
random.sample(poem_lines, num_input_lines - num_prefix_lines))
num_lines_needed = num_input_lines - num_prefix_lines
sampled_lines = "".join(prefix_lines +
random.choices(poem_lines, k=num_lines_needed))

prompt = f"{base_prompt}{sampled_lines}"
message = [
Expand Down Expand Up @@ -536,7 +536,7 @@ def process_one_metric(
# E.g., "Time to First Token"
metric_header: str,
):
# This function print and add statistics of the specified
# This function prints and adds statistics of the specified
# metric.
if metric_attribute_name not in selected_percentile_metrics:
return
Expand Down

0 comments on commit 94bf9ae

Please sign in to comment.