62 lines
1.9 KiB
Bash
Executable File
62 lines
1.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -Eeuo pipefail
|
|
|
|
# P3 extension benchmark for vllm-dspark
|
|
# Mirrored from benchmark_grid_0707/h200_vllm_p3_grid.sh
|
|
|
|
BACKEND="vllm"
|
|
PORT="${PORT:-30004}"
|
|
MODEL="/data/models/DeepSeek-V4-Flash-DSpark"
|
|
BENCH_PY="/data/user1/yy/envs/sglang/bin/python"
|
|
DATASET="/data/user1/yy/datasets/ShareGPT_filtered_chat.json"
|
|
RESULT_ROOT="${RESULT_ROOT:-/data/user1/yy/bench_results/dspark_grid}"
|
|
WARMUP_REQUESTS="${WARMUP_REQUESTS:-100}"
|
|
PHASE="p3_extension"
|
|
RUN_ID="${RUN_ID:-$(date '+%Y%m%d-%H%M%S')}"
|
|
|
|
num_prompts() {
|
|
local c="$1"
|
|
if (( c <= 4 )); then
|
|
local n=$((c * 8))
|
|
(( n < 32 )) && n=32
|
|
echo "${n}"
|
|
elif (( c <= 32 )); then
|
|
echo $((c * 16))
|
|
else
|
|
echo $((c * 8))
|
|
fi
|
|
}
|
|
|
|
run_case() {
|
|
local scenario="$1"
|
|
local input_len="$2"
|
|
local output_len="$3"
|
|
local concurrencies="$4"
|
|
for concurrency in ${concurrencies}; do
|
|
local prompts
|
|
prompts="$(num_prompts "${concurrency}")"
|
|
local out_dir="${RESULT_ROOT}/${PHASE}/${scenario}/${RUN_ID}"
|
|
mkdir -p "${out_dir}"
|
|
echo "phase=${PHASE} scenario=${scenario} input=${input_len} output=${output_len} concurrency=${concurrency} prompts=${prompts}"
|
|
"${BENCH_PY}" -m sglang.bench_serving \
|
|
--backend "${BACKEND}" \
|
|
--host 127.0.0.1 \
|
|
--port "${PORT}" \
|
|
--model "${MODEL}" \
|
|
--dataset-name random \
|
|
--dataset-path "${DATASET}" \
|
|
--random-input-len "${input_len}" \
|
|
--random-output-len "${output_len}" \
|
|
--num-prompts "${prompts}" \
|
|
--max-concurrency "${concurrency}" \
|
|
--warmup-requests "${WARMUP_REQUESTS}" \
|
|
2>&1 | tee "${out_dir}/c${concurrency}.log"
|
|
done
|
|
}
|
|
|
|
curl --fail --silent --show-error --max-time 5 "http://127.0.0.1:${PORT}/health" >/dev/null
|
|
run_case "decode_heavy" 512 2000 "1 8 16 32"
|
|
run_case "long_rag" 32000 512 "1 2 4 8"
|
|
run_case "stress_standard" 1000 256 "96 128"
|
|
run_case "stress_generation" 1000 1000 "96 128"
|