Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions benchmarks/benchmark_serving.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def gen_mmlu_qa(data: Any, mmlu_method: str = "") -> str:
f"(D) {row['D']}\n"
)

output += "\nCorrect answer: "
output += "\nCorrect answer:"

if mmlu_method == "HELM":
output += f"({row['answer']})\n\n"
Expand Down Expand Up @@ -938,7 +938,7 @@ def parse_args() -> argparse.Namespace:
parser.add_argument(
"--num-prompts",
type=int,
default=1000,
default=-1,
help=(
"Number of prompts to process. (number of sample requests we randomly"
" collect from dataset)"
Expand Down Expand Up @@ -1133,11 +1133,16 @@ def main(args: argparse.Namespace):
# A given args.max_output_length value is the max generation step,
# when the args.max_output_length is default to None, the sample's golden
# output length will be used to decide the generation step.
if args.num_prompts == -1:
Comment thread
bzgoogle marked this conversation as resolved.
num_requests = len(dataset)
else:
num_requests = args.num_prompts

input_requests = sample_requests(
dataset=dataset,
tokenizer=tokenizer,
use_chat_template=use_chat_template,
num_requests=args.num_prompts,
num_requests=num_requests,
dataset_type=args.dataset,
max_output_length=args.max_output_length,
min_input_length=args.min_input_length,
Expand Down
Loading