fix(910c/glm52): start_vllm_docker.sh 加per-TP参数覆盖 + 修printf转义破坏JSON
问题: add16实际启动走start_vllm_docker.sh(用config.env全局MAX_MODEL_LEN=131072), 而非engine_build_server_args(有per-TP覆盖但只写server_cmd.txt不影响启动). TP=8用131072上下文+无per-TP覆盖,且engine_build_server_args的printf %q转义 破坏了JSON(--additional-config的enable_dsa_cp等未生效),致MoE tiling失败. 修复: 1. start_vllm_docker.sh: 加per-TP case覆盖(TP=8:16384/64/0.95, TP=16:131072/256/0.92) 2. run_adaptive_concurrency_add16.sh: engine_build_server_args 用单引号包裹替代 printf %q,避免JSON被反斜杠转义(仅影响server_cmd.txt记录,实际启动走start_vllm_docker.sh)
This commit is contained in:
parent
6d3338244b
commit
70c5c57f8f
@ -92,6 +92,12 @@ engine_build_server_args() {
|
||||
;;
|
||||
esac
|
||||
log "server args tp=${tp} dp=${dp} gpu_mem_util=${mem_util} max_model_len=${max_len} max_num_seqs=${max_seqs}" >&2
|
||||
# MoE / DSA-CP args required by GLM-5.2 on vllm-ascend (must match
|
||||
# start_vllm_docker.sh). --enable-expert-parallel is mandatory for
|
||||
# FlashComm v1 (VLLM_ASCEND_ENABLE_FLASHCOMM1=1); without it MoE
|
||||
# MoeDistributeDispatchV2 tiling fails at engine init.
|
||||
local compilation_config='{"cudagraph_mode": "FULL_DECODE_ONLY"}'
|
||||
local additional_config='{"enable_dsa_cp": true,"enable_sparse_sfa_c8": false, "enable_sparse_li_c8": true,"enable_balance_scheduling": true,"multistream_overlap_shared_expert":true}'
|
||||
local -a args=(
|
||||
vllm serve "$MODEL_PATH"
|
||||
--served-model-name "$SERVED_MODEL_NAME"
|
||||
@ -99,16 +105,26 @@ engine_build_server_args() {
|
||||
--kv-cache-dtype "$KV_CACHE_DTYPE"
|
||||
--block-size "$BLOCK_SIZE"
|
||||
--tensor-parallel-size "$tp"
|
||||
--enable-expert-parallel
|
||||
--gpu-memory-utilization "$mem_util"
|
||||
--max-model-len "$max_len"
|
||||
--max-num-seqs "$max_seqs"
|
||||
--compilation-config "$compilation_config"
|
||||
--additional-config "$additional_config"
|
||||
--host 0.0.0.0
|
||||
--port "$ENGINE_PORT"
|
||||
)
|
||||
if (( dp > 1 )); then
|
||||
args+=(--data-parallel-size "$dp")
|
||||
fi
|
||||
printf '%q ' "${args[@]}"
|
||||
# Emit args space-separated. JSON config strings are single-quoted
|
||||
# verbatim (not %q-escaped) so the recorded command stays re-runnable.
|
||||
local out=""
|
||||
local a
|
||||
for a in "${args[@]}"; do
|
||||
out+="'$a' "
|
||||
done
|
||||
printf '%s' "$out"
|
||||
}
|
||||
|
||||
engine_start_server() {
|
||||
|
||||
@ -31,6 +31,21 @@ docker rm -f "$NAME" >/dev/null 2>&1 || true
|
||||
# vLLM-Ascend launch args. Differences vs NVIDIA vLLM:
|
||||
#\n - no --no-enable-flashinfer-autotune (Ascend uses its own attention path)
|
||||
#\n - --kv-cache-dtype may need to be fp16 if the image rejects fp8 on 910C
|
||||
# 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.
|
||||
case "$TP" in
|
||||
8)
|
||||
GPU_MEMORY_UTILIZATION="${TP8_GPU_MEMORY_UTILIZATION:-0.95}"
|
||||
MAX_MODEL_LEN="${TP8_MAX_MODEL_LEN:-16384}"
|
||||
MAX_NUM_SEQS="${TP8_MAX_NUM_SEQS:-64}"
|
||||
;;
|
||||
16)
|
||||
GPU_MEMORY_UTILIZATION="${TP16_GPU_MEMORY_UTILIZATION:-0.92}"
|
||||
MAX_MODEL_LEN="${TP16_MAX_MODEL_LEN:-131072}"
|
||||
MAX_NUM_SEQS="${TP16_MAX_NUM_SEQS:-256}"
|
||||
;;
|
||||
esac
|
||||
|
||||
SERVER_ARGS=(
|
||||
"$MODEL_PATH"
|
||||
--served-model-name "$SERVED_MODEL_NAME"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user