Skip to content

Commit

Permalink
[Minor] Fix benchmark_latency script (vllm-project#2765)
Browse files Browse the repository at this point in the history
  • Loading branch information
WoosukKwon authored and jimpang committed Feb 22, 2024
1 parent 7507217 commit ca65e82
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions benchmarks/benchmark_latency.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ def main(args: argparse.Namespace):
max_tokens=args.output_len,
)
print(sampling_params)
dummy_prompt_token_ids = [[0] * args.input_len] * args.batch_size
dummy_prompt_token_ids = np.random.randint(10000,
size=(args.batch_size,
args.input_len))
dummy_prompt_token_ids = dummy_prompt_token_ids.tolist()

def run_to_completion(profile_dir: Optional[str] = None):
if profile_dir:
Expand Down Expand Up @@ -71,7 +74,7 @@ def run_to_completion(profile_dir: Optional[str] = None):
"."
) / "vllm_benchmark_result" / f"latency_result_{time.time()}"
print(f"Profiling (results will be saved to '{profile_dir}')...")
run_to_completion(profile_dir=args.profile_result_dir)
run_to_completion(profile_dir=profile_dir)
return

# Benchmark.
Expand Down

0 comments on commit ca65e82

Please sign in to comment.