Skip to content

Commit

Permalink
fix issue ray-project#63
Browse files Browse the repository at this point in the history
  • Loading branch information
huangdi.hd committed Aug 9, 2024
1 parent 03872a4 commit 3672188
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions token_benchmark_ray.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,17 @@ def get_token_throughput_latencies(
):
iter += 1

default_sampling_params = {"max_tokens": num_output_tokens_list.pop()}
default_sampling_params.update(additional_sampling_params)
request_config = RequestConfig(
model=model,
prompt=prompts.pop(),
sampling_params=default_sampling_params,
llm_api=llm_api,
)
req_launcher.launch_requests(request_config)
if iter <= max_num_completed_requests:
default_sampling_params = {"max_tokens": num_output_tokens_list.pop()}
default_sampling_params.update(additional_sampling_params)
request_config = RequestConfig(
model=model,
prompt=prompts.pop(),
sampling_params=default_sampling_params,
llm_api=llm_api,
)
req_launcher.launch_requests(request_config)

# Retrieving results less frequently allows for more concurrent requests
# to be launched. This will overall reduce the amount of time it takes
# for the test to run.
Expand Down

0 comments on commit 3672188

Please sign in to comment.