From ccb20db8bd2abb302a8dc0fbc0901f284df9b3f5 Mon Sep 17 00:00:00 2001 From: Fish <45708320+lxline@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:27:01 +0800 Subject: [PATCH] [Bugfix] Benchmark serving script used global parameter 'args' in function 'sample_random_requests' (#6428) --- benchmarks/benchmark_serving.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/benchmark_serving.py b/benchmarks/benchmark_serving.py index b625f92d77d38..fc0dbf77f16b9 100644 --- a/benchmarks/benchmark_serving.py +++ b/benchmarks/benchmark_serving.py @@ -203,7 +203,7 @@ def sample_random_requests( ) offsets = np.random.randint(0, tokenizer.vocab_size, size=num_prompts) input_requests = [] - for i in range(args.num_prompts): + for i in range(num_prompts): prompt = tokenizer.decode([(offsets[i] + i + j) % tokenizer.vocab_size for j in range(input_lens[i])]) input_requests.append(