declare -a max_concurrency=(2 4 8 16)
declare -a input_lens=(3500 3500 3500)
declare -a num_prompts=(16 32 64)
for i in "${!input_lens[@]}"; do
for j in "${!max_concurrency[@]}"; do
INPUT_LEN=${input_lens[$i]}
RATE=${max_concurrency[$j]}
CONCURRENCY=${max_concurrency[$j]}
PROMPTS=${num_prompts[$i]}
echo "Running benchmark with input len: $INPUT_LEN, output len $OUTPUT_LEN, request rate $RATE, concurrency $CONCURRENCY, prompts $PROMPTS, first round"
python3 benchmark_serving.py --backend vllm \
--tokenizer /models/deepseek \
--base-url http://127.0.0.1:8080 \
--endpoint /v1/completions \
--metric_percentiles '50,90,95,99' \
--goodput ttft:5000 tpot:250 \
--num-prompts $PROMPTS \
--max-concurrency $CONCURRENCY \
--random-input-len $INPUT_LEN \
--random-output-len $OUTPUT_LEN \
>> $dir/${model}_${CONCURRENCY}_${PROMPTS}_${INPUT_LEN}_${OUTPUT_LEN}_firstround.txt 2>&1
echo "Running benchmark with input len: $INPUT_LEN, output len $OUTPUT_LEN, request rate $RATE, concurrency $CONCURRENCY, prompts $PROMPTS, second round"
python3 benchmark_serving.py --backend vllm \
--tokenizer /models/deepseek \
--base-url http://127.0.0.1:8080 \
--endpoint /v1/completions \
--metric_percentiles '50,90,95,99' \
--goodput ttft:5000 tpot:250 \
--num-prompts $PROMPTS \
--max-concurrency $CONCURRENCY \
--random-input-len $INPUT_LEN \
--random-output-len $OUTPUT_LEN \
>> $dir/${model}_${CONCURRENCY}_${PROMPTS}_${INPUT_LEN}_${OUTPUT_LEN}_secondround.txt 2>&1
echo "Running benchmark with input len: $INPUT_LEN, output len $OUTPUT_LEN, request rate $RATE, concurrency $CONCURRENCY, prompts $PROMPTS, finished"