From 6c81183fd79f4f5345d61fa74b7638ec28edac15 Mon Sep 17 00:00:00 2001 From: shishi Date: Tue, 28 Jul 2026 16:51:14 +0800 Subject: [PATCH] =?UTF-8?q?feat(910c/glm52):=20=E5=B9=B6=E8=A1=8C=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=94=B9=E4=B8=BA=E5=8F=AA=E6=B5=8B=20TP=3D8=20?= =?UTF-8?q?=E5=92=8C=20TP=3D16,=E5=B9=B6=E6=8C=89TP=E5=8C=BA=E5=88=86?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit config.env: PARALLEL_CONFIGS 默认值从 "2 4"/"4 2"/"8 1" 改为 "8 1"/"16 1" run_adaptive_concurrency_add16.sh: engine_build_server_args 按 TP 覆盖参数 - TP=8: gpu_mem_util=0.95, max_model_len=16384, max_num_seqs=64 (64GB/die KV cache 紧张) - TP=16: gpu_mem_util=0.92, max_model_len=131072, max_num_seqs=256 (16 die 全用) 可通过 TP8_*/TP16_* 环境变量进一步覆盖 --- .../glm52_910c_vllm_tp_dp_matrix/config.env | 9 ++++--- .../run_adaptive_concurrency_add16.sh | 24 ++++++++++++++++--- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/experiments/910c/glm52_910c_vllm_tp_dp_matrix/config.env b/experiments/910c/glm52_910c_vllm_tp_dp_matrix/config.env index 3db87cd..5f41f2a 100644 --- a/experiments/910c/glm52_910c_vllm_tp_dp_matrix/config.env +++ b/experiments/910c/glm52_910c_vllm_tp_dp_matrix/config.env @@ -47,9 +47,9 @@ export CUDA_VISIBLE_DEVICES="${CUDA_VISIBLE_DEVICES:-0,1,2,3,4,5,6,7}" RUNTIME_BASE="${RUNTIME_BASE:-${SCRIPT_DIR}/runtime}" # Parallel configurations to test. Format: "TP DP" -# Each Ascend910 card has 2 dies; TP addresses dies, so TP=8 uses 8 dies across -# 4 cards and leaves room for DP. TP=2/DP=4 and TP=4/DP=2 and TP=8/DP=1 all fit -# within 8 cards (16 dies). Override via PARALLEL_CONFIGS_STR="8,1". +# Each Ascend910 card has 2 dies; TP addresses dies. TP=8 uses 8 dies (4 cards), +# TP=16 uses all 16 dies (8 cards). Only these two configs are tested. +# Override via PARALLEL_CONFIGS_STR="8,1 16,1" (space-separated). if [[ -n "${PARALLEL_CONFIGS_STR:-}" ]]; then declare -a PARALLEL_CONFIGS=() for pair in $PARALLEL_CONFIGS_STR; do @@ -57,9 +57,8 @@ if [[ -n "${PARALLEL_CONFIGS_STR:-}" ]]; then done else declare -a PARALLEL_CONFIGS=( - "2 4" - "4 2" "8 1" + "16 1" ) fi diff --git a/experiments/910c/glm52_910c_vllm_tp_dp_matrix/run_adaptive_concurrency_add16.sh b/experiments/910c/glm52_910c_vllm_tp_dp_matrix/run_adaptive_concurrency_add16.sh index 0cec9d8..3012a56 100755 --- a/experiments/910c/glm52_910c_vllm_tp_dp_matrix/run_adaptive_concurrency_add16.sh +++ b/experiments/910c/glm52_910c_vllm_tp_dp_matrix/run_adaptive_concurrency_add16.sh @@ -74,6 +74,24 @@ engine_stop_server() { engine_build_server_args() { local tp="$1" local dp="$2" + # Per-TP overrides: TP=8 has tight KV cache on 64GB/die (cap context/seqs), + # TP=16 uses all 16 dies and can serve the full 128K context. + local mem_util="$GPU_MEMORY_UTILIZATION" + local max_len="$MAX_MODEL_LEN" + local max_seqs="$MAX_NUM_SEQS" + case "$tp" in + 8) + mem_util="${TP8_GPU_MEMORY_UTILIZATION:-0.95}" + max_len="${TP8_MAX_MODEL_LEN:-16384}" + max_seqs="${TP8_MAX_NUM_SEQS:-64}" + ;; + 16) + mem_util="${TP16_GPU_MEMORY_UTILIZATION:-0.92}" + max_len="${TP16_MAX_MODEL_LEN:-131072}" + max_seqs="${TP16_MAX_NUM_SEQS:-256}" + ;; + esac + log "server args tp=${tp} dp=${dp} gpu_mem_util=${mem_util} max_model_len=${max_len} max_num_seqs=${max_seqs}" >&2 local -a args=( vllm serve "$MODEL_PATH" --served-model-name "$SERVED_MODEL_NAME" @@ -81,9 +99,9 @@ engine_build_server_args() { --kv-cache-dtype "$KV_CACHE_DTYPE" --block-size "$BLOCK_SIZE" --tensor-parallel-size "$tp" - --gpu-memory-utilization "$GPU_MEMORY_UTILIZATION" - --max-model-len "$MAX_MODEL_LEN" - --max-num-seqs "$MAX_NUM_SEQS" + --gpu-memory-utilization "$mem_util" + --max-model-len "$max_len" + --max-num-seqs "$max_seqs" --host 0.0.0.0 --port "$ENGINE_PORT" )