Skip to content

Commit 4fdcca6

Browse files
authored
Support inf request rate and number prompts in LPG (#847)
* minor updates to lpg and checkpoint conversion * Support inf request rate and number prompts
1 parent b0588cc commit 4fdcca6

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

benchmarks/benchmark/tools/profile-generator/container/latency_throughput_curve.sh

+8-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,14 @@ for request_rate in $(echo $REQUEST_RATES | tr ',' ' '); do
2929
# TODO: Check if profile already exists, if so then skip
3030
timestamp=$(date +"%Y-%m-%d_%H-%M-%S")
3131
output_file="latency-profile-${timestamp}.txt"
32-
PYTHON_OPTS="$PYTHON_OPTS --save-json-results --host=$IP --port=$PORT --model=$TOKENIZER --dataset=$PROMPT_DATASET_FILE --tokenizer=$TOKENIZER --request-rate=$request_rate --backend=$BACKEND --num-prompts=$((request_rate * $BENCHMARK_TIME_SECONDS)) --max-input-length=$INPUT_LENGTH --max-output-length=$OUTPUT_LENGTH"
32+
if [ ${request_rate} == 0 ]; then
33+
request_rate="inf"
34+
NUM_PROMPTS=$MAX_NUM_PROMPTS
35+
else
36+
NUM_PROMPTS=$((${request_rate} * $BENCHMARK_TIME_SECONDS))
37+
fi
38+
39+
PYTHON_OPTS="$PYTHON_OPTS --save-json-results --host=$IP --port=$PORT --model=$TOKENIZER --dataset=$PROMPT_DATASET_FILE --tokenizer=$TOKENIZER --request-rate=$request_rate --backend=$BACKEND --num-prompts=$NUM_PROMPTS --max-input-length=$INPUT_LENGTH --max-output-length=$OUTPUT_LENGTH"
3340
if [[ "$SCRAPE_SERVER_METRICS" = "true" ]]; then
3441
PYTHON_OPTS="$PYTHON_OPTS --scrape-server-metrics"
3542
fi

benchmarks/benchmark/tools/profile-generator/modules/latency-profile/manifest-templates/latency-profile-generator.yaml.tpl

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ spec:
4242
value: ${output_bucket}
4343
- name: SCRAPE_SERVER_METRICS
4444
value: ${scrape_server_metrics}
45+
- name: MAX_NUM_PROMPTS
46+
value: ${max_num_prompts}
4547
%{ for hugging_face_token_secret in hugging_face_token_secret_list ~}
4648
- name: HF_TOKEN
4749
valueFrom:

0 commit comments

Comments
 (0)