Generalize Qwen30 fixed-shape real runner
This commit is contained in:
@@ -6,6 +6,10 @@ OUTPUT_ROOT="${OUTPUT_ROOT:?OUTPUT_ROOT is required}"
|
||||
TP="${TP:?TP is required}"
|
||||
MNS="${MNS:?MNS is required}"
|
||||
RATES="${RATES:-4 8 16 32 64}"
|
||||
INPUT_TOKENS="${INPUT_TOKENS:-2048}"
|
||||
OUTPUT_TOKENS="${OUTPUT_TOKENS:-1}"
|
||||
TPOT_SLO_MS="${TPOT_SLO_MS:-150}"
|
||||
WARMUP_SECONDS="${WARMUP_SECONDS:-2}"
|
||||
SERVER_PORT="${SERVER_PORT:?SERVER_PORT is required}"
|
||||
VENV_ROOT="${VENV_ROOT:-/tmp/wjh/venvs/vllm-0.20.0-cu129-profiler-v1}"
|
||||
MODEL_ROOT="${MODEL_ROOT:-/home/admin/cpfs/wjh/models/Qwen/Qwen3-30B-A3B}"
|
||||
@@ -35,18 +39,19 @@ if [[ "${#GPU_IDS[@]}" -ne "${TP}" ]]; then
|
||||
fi
|
||||
read -r -a RATE_ARRAY <<< "${RATES}"
|
||||
|
||||
echo "QWEN30_PREFILL_REAL_LAUNCH_ECHO host=$(hostname) gpus=${CUDA_VISIBLE_DEVICES} model=${MODEL_ROOT} runtime=vLLM-0.20.0+cu129 dtype=BF16 config=TP${TP}_MNS${MNS}_MBT8192 rates=${RATES// /,} rounds=2 requests=64 shape=ISL2048_OSL1 arrivals=uniform prefix=off cuda_graph=runtime_default isolation=fresh_server_per_anchor output=${OUTPUT_ROOT}"
|
||||
echo "QWEN30_FIXED_REAL_LAUNCH_ECHO host=$(hostname) gpus=${CUDA_VISIBLE_DEVICES} model=${MODEL_ROOT} runtime=vLLM-0.20.0+cu129 dtype=BF16 config=TP${TP}_MNS${MNS}_MBT8192 rates=${RATES// /,} rounds=2 requests=64 shape=ISL${INPUT_TOKENS}_OSL${OUTPUT_TOKENS} ttft_slo=1000+1000*ISL/8000ms tpot_slo=${TPOT_SLO_MS}ms warmup_seconds=${WARMUP_SECONDS} arrivals=uniform prefix=off cuda_graph=runtime_default isolation=fresh_server_per_anchor output=${OUTPUT_ROOT}"
|
||||
date -u +"START_UTC=%Y-%m-%dT%H:%M:%SZ"
|
||||
sha256sum run_qwen30_prefill_real_config.sh qwen30_prefill_client.py \
|
||||
> "${OUTPUT_ROOT}/provenance/source.sha256"
|
||||
"${VENV_ROOT}/bin/python" - "${TP}" "${MNS}" "${RATES}" \
|
||||
"${VENV_ROOT}/bin/python" - "${TP}" "${MNS}" "${RATES}" "${INPUT_TOKENS}" "${OUTPUT_TOKENS}" "${TPOT_SLO_MS}" "${WARMUP_SECONDS}" \
|
||||
> "${OUTPUT_ROOT}/provenance/contract.json" <<'PY'
|
||||
import importlib.metadata as metadata
|
||||
import json
|
||||
import platform
|
||||
import sys
|
||||
|
||||
tp, mns, rates = sys.argv[1:]
|
||||
tp, mns, rates, input_tokens, output_tokens, tpot_slo_ms, warmup_seconds = sys.argv[1:]
|
||||
input_tokens = int(input_tokens)
|
||||
print(json.dumps({
|
||||
"python": platform.python_version(),
|
||||
"torch": metadata.version("torch"),
|
||||
@@ -57,10 +62,11 @@ print(json.dumps({
|
||||
"rounds": 2,
|
||||
"requests_per_anchor": 64,
|
||||
"anchor_isolation": "fresh_server_per_rate_per_round",
|
||||
"target_rate_warmup_requests": "min(32, max(4, ceil(rate * 2)))",
|
||||
"input_tokens": 2048,
|
||||
"output_tokens": 1,
|
||||
"ttft_slo_ms": 1256.0,
|
||||
"target_rate_warmup_requests": f"min(32, max(4, ceil(rate * {warmup_seconds})))",
|
||||
"input_tokens": input_tokens,
|
||||
"output_tokens": int(output_tokens),
|
||||
"ttft_slo_ms": 1000.0 + 1000.0 * input_tokens / 8000.0,
|
||||
"tpot_slo_ms": float(tpot_slo_ms) if int(output_tokens) > 1 else None,
|
||||
"target_pass_rate": 0.95,
|
||||
}, indent=2, sort_keys=True))
|
||||
PY
|
||||
@@ -112,19 +118,22 @@ for ROUND in 1 2; do
|
||||
exit 1
|
||||
fi
|
||||
|
||||
WARMUP_REQUESTS="$("${VENV_ROOT}/bin/python" - "${RATE}" <<'PY'
|
||||
WARMUP_REQUESTS="$("${VENV_ROOT}/bin/python" - "${RATE}" "${WARMUP_SECONDS}" <<'PY'
|
||||
import math
|
||||
import sys
|
||||
print(min(32, max(4, math.ceil(float(sys.argv[1]) * 2.0))))
|
||||
print(min(32, max(4, math.ceil(float(sys.argv[1]) * float(sys.argv[2])))))
|
||||
PY
|
||||
)"
|
||||
"${VENV_ROOT}/bin/python" qwen30_prefill_client.py --port "${SERVER_PORT}" \
|
||||
--served-model "${SERVED_MODEL}" --model-path "${MODEL_ROOT}" --rate "${RATE}" \
|
||||
--requests "${WARMUP_REQUESTS}" \
|
||||
--requests "${WARMUP_REQUESTS}" --input-tokens "${INPUT_TOKENS}" \
|
||||
--output-tokens "${OUTPUT_TOKENS}" --tpot-slo-ms "${TPOT_SLO_MS}" \
|
||||
--output "${ROUND_ROOT}/results/warmup_${KEY}.json"
|
||||
"${VENV_ROOT}/bin/python" qwen30_prefill_client.py --port "${SERVER_PORT}" \
|
||||
--served-model "${SERVED_MODEL}" --model-path "${MODEL_ROOT}" --rate "${RATE}" \
|
||||
--requests 64 --output "${ROUND_ROOT}/results/${KEY}.json"
|
||||
--requests 64 --input-tokens "${INPUT_TOKENS}" \
|
||||
--output-tokens "${OUTPUT_TOKENS}" --tpot-slo-ms "${TPOT_SLO_MS}" \
|
||||
--output "${ROUND_ROOT}/results/${KEY}.json"
|
||||
cleanup
|
||||
done
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user