# TP×DP matrix experiment for DeepSeek-V4-Flash on Ascend 910C (8 NPUs / 16 dies) # using vLLM-Ascend. # Tests vLLM with three parallel configurations: # TP=2, DP=4 -> 2 dies per replica, 4 replicas # TP=4, DP=2 -> 4 dies per replica, 2 replicas # TP=8, DP=1 -> 8 dies, no data parallelism # # Platform: ascend_910c (see platforms/ascend_910c.env). # Host: 910c.1 / NPU-NODE61, openEuler 22.03 SP4 aarch64, driver 25.5.2, CANN 9.0.0. # # ⚠️ PLACEHOLDER: DeepSeek-V4-Flash weights are NOT yet present on this host # (only GLM-5.2-{w4a8c8,w8a8} under /mnt/models). Download DSV4-Flash first, # then fix MODEL_PATH below. Smoke run will fail until the model exists. # Recommended host path: /mnt/models/DeepSeek-V4-Flash (FP8) # /mnt/models/DeepSeek-V4-Flash-INT8 (INT8) EXPERIMENT="dsv4_910c_vllm_tp_dp_matrix" MODEL_NAME="DeepSeek-V4-Flash" # TODO: point this at the real DSV4-Flash directory once downloaded. MODEL_PATH="${MODEL_PATH:-/mnt/models/DeepSeek-V4-Flash}" SERVED_MODEL_NAME="deepseek-v4-flash" VLLM_PORT="${VLLM_PORT:-30052}" # Dedicated container name so this experiment never touches other 910c runs. CONTAINER_NAME="${CONTAINER_NAME:-vllm-ascend-dsv4-910c}" # Python interpreter for the benchmark client inside the vllm-ascend container. CONTAINER_PYTHON="${CONTAINER_PYTHON:-/usr/local/bin/python}" # vllm-ascend image. Use the general v0.23 image for DSV4 (the GLM5.2-tuned # variant may carry GLM-specific patches). Load from: # /mnt/models/vllm-ascend-v0.23.0rc1-a3-openeuler.tar USE_DOCKER="${USE_DOCKER:-1}" DOCKER_IMAGE="${DOCKER_IMAGE:-vllm-ascend:v0.23.0rc1-a3-openeuler}" DOCKER_CLIENT_IMAGE="${DOCKER_CLIENT_IMAGE:-lmsysorg/sglang:latest}" USE_DOCKER_CLIENT="${USE_DOCKER_CLIENT:-0}" export ASCEND_VISIBLE_DEVICES="${ASCEND_VISIBLE_DEVICES:-0,1,2,3,4,5,6,7}" 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" # DSV4-Flash FP8 routed-expert weights ~264 GiB total. Per-die load = 264/TP GiB. # TP=2 -> 132 GiB/die > 64 GiB HBM ❌ OOM expected (kept but will fail) # TP=4 -> 66 GiB/die > 64 GiB HBM ❌ borderline OOM (KV cache leaves no room) # TP=8 -> 33 GiB/die < 64 GiB HBM ✅ fits with room for KV cache # TP=2/DP=4 and TP=4/DP=2 are likely infeasible for FP8 on 64GB dies; they are # kept here so the smoke run records the OOM boundary explicitly. Switch to # INT8 weights (MODEL_PATH=...-INT8, ~132 GiB total) to make TP=4 viable. if [[ -n "${PARALLEL_CONFIGS_STR:-}" ]]; then declare -a PARALLEL_CONFIGS=() for pair in $PARALLEL_CONFIGS_STR; do PARALLEL_CONFIGS+=("${pair//,/ }") done else declare -a PARALLEL_CONFIGS=( "2 4" "4 2" "8 1" ) fi # vLLM-Ascend server settings for DSV4-Flash. GPU_MEMORY_UTILIZATION="${GPU_MEMORY_UTILIZATION:-0.9}" KV_CACHE_DTYPE="${KV_CACHE_DTYPE:-fp8}" BLOCK_SIZE="${BLOCK_SIZE:-128}" # DSV4-Flash supports up to 1M context, but 64GB HBM/die caps realistic ISL. # Start at 128K; extend via matrix.json once TP=8 is verified. MAX_MODEL_LEN="${MAX_MODEL_LEN:-131072}" MAX_NUM_SEQS="${MAX_NUM_SEQS:-256}" VLLM_ASCEND_ATTENTION_BACKEND="${VLLM_ASCEND_ATTENTION_BACKEND:-atb}" DATASET_PATH="${DATASET_PATH:-${ROOT_DIR}/datasets/ShareGPT_V3_unfiltered_cleaned_split.json}" MATRIX_FILE="${MATRIX_FILE:-${SCRIPT_DIR:-.}/matrix.json}" MATRIX_MODE="${MATRIX_MODE:-Y}" export CONCURRENCY_SAMPLES="${CONCURRENCY_SAMPLES:-2}" SCENARIO_TIMEOUT_S="${SCENARIO_TIMEOUT_S:-1800}" GPU_MEM_SAMPLE_INTERVAL_S="${GPU_MEM_SAMPLE_INTERVAL_S:-1}" DRY_RUN="${DRY_RUN:-0}" GRID_LIMIT="${GRID_LIMIT:-0}"