diff --git a/.github/configs/nvidia-master.yaml b/.github/configs/nvidia-master.yaml index 5b550879c..47d66aa2d 100644 --- a/.github/configs/nvidia-master.yaml +++ b/.github/configs/nvidia-master.yaml @@ -1669,6 +1669,29 @@ dsr1-fp4-b200-sglang: - { tp: 4, ep: 4, conc-start: 4, conc-end: 128 } - { tp: 8, ep: 8, conc-start: 4, conc-end: 16 } +# NOTE: At the time of submission, https://cookbook.sglang.io/autoregressive/DeepSeek/DeepSeek-R1 +# does not have a B300-specific recipe, so this config reuses the existing DSR1 FP4 +# B200 SGLang recipe as-is until B300-specific tuning is available. +dsr1-fp4-b300-sglang: + image: lmsysorg/sglang:v0.5.10.post1-cu130 + model: nvidia/DeepSeek-R1-0528-FP4-V2 + model-prefix: dsr1 + runner: b300 + precision: fp4 + framework: sglang + multinode: false + seq-len-configs: + - isl: 1024 + osl: 1024 + search-space: + - { tp: 4, ep: 4, conc-start: 4, conc-end: 128 } + - { tp: 8, ep: 8, conc-start: 4, conc-end: 128 } + - isl: 8192 + osl: 1024 + search-space: + - { tp: 4, ep: 4, conc-start: 4, conc-end: 128 } + - { tp: 8, ep: 8, conc-start: 4, conc-end: 16 } + dsr1-fp4-b200-trt: image: nvcr.io#nvidia/tensorrt-llm/release:1.2.0rc6.post2 model: nvidia/DeepSeek-R1-0528-FP4-V2 diff --git a/benchmarks/single_node/dsr1_fp4_b300.sh b/benchmarks/single_node/dsr1_fp4_b300.sh new file mode 100644 index 000000000..7c26f3cba --- /dev/null +++ b/benchmarks/single_node/dsr1_fp4_b300.sh @@ -0,0 +1,81 @@ +#!/usr/bin/env bash + +# NOTE: At the time of submission, https://cookbook.sglang.io/autoregressive/DeepSeek/DeepSeek-R1 +# does not have a B300-specific recipe, so this script reuses the existing +# DSR1 FP4 B200 SGLang recipe as-is until B300-specific tuning is available. + +source "$(dirname "$0")/../benchmark_lib.sh" + +check_env_vars \ + MODEL \ + TP \ + CONC \ + ISL \ + OSL \ + RANDOM_RANGE_RATIO \ + RESULT_FILENAME \ + EP_SIZE + +if [[ -n "$SLURM_JOB_ID" ]]; then + echo "JOB $SLURM_JOB_ID running on $SLURMD_NODENAME" +fi + +hf download "$MODEL" + +nvidia-smi + +SERVER_LOG=/workspace/server.log +PORT=${PORT:-8888} + +# Default: recv every ~10 requests; if CONC ≥ 16, relax to ~30 requests between scheduler recv polls. +if [[ $CONC -ge 16 ]]; then + SCHEDULER_RECV_INTERVAL=30 +else + SCHEDULER_RECV_INTERVAL=10 +fi +echo "SCHEDULER_RECV_INTERVAL: $SCHEDULER_RECV_INTERVAL, CONC: $CONC, ISL: $ISL, OSL: $OSL" + +EVAL_CONTEXT_ARGS="" +if [ "${EVAL_ONLY}" = "true" ]; then + setup_eval_context + EVAL_CONTEXT_ARGS="--context-length $EVAL_MAX_MODEL_LEN" +fi +# Start GPU monitoring (power, temperature, clocks every second) +start_gpu_monitor + +set -x +PYTHONNOUSERSITE=1 python3 -m sglang.launch_server --model-path $MODEL --host 0.0.0.0 --port $PORT --trust-remote-code \ +--tensor-parallel-size=$TP --data-parallel-size=1 \ +--cuda-graph-max-bs 256 --max-running-requests 256 --mem-fraction-static 0.85 --kv-cache-dtype fp8_e4m3 \ +--chunked-prefill-size 16384 \ +--ep-size $EP_SIZE --quantization modelopt_fp4 --enable-flashinfer-allreduce-fusion --scheduler-recv-interval $SCHEDULER_RECV_INTERVAL \ +--enable-symm-mem --disable-radix-cache --attention-backend trtllm_mla --moe-runner-backend flashinfer_trtllm --stream-interval 10 $EVAL_CONTEXT_ARGS > $SERVER_LOG 2>&1 & + +SERVER_PID=$! + +# Wait for server to be ready +wait_for_server_ready --port "$PORT" --server-log "$SERVER_LOG" --server-pid "$SERVER_PID" + +pip install -q datasets pandas + +run_benchmark_serving \ + --model "$MODEL" \ + --port "$PORT" \ + --backend vllm \ + --input-len "$ISL" \ + --output-len "$OSL" \ + --random-range-ratio "$RANDOM_RANGE_RATIO" \ + --num-prompts $((CONC * 10)) \ + --max-concurrency "$CONC" \ + --result-filename "$RESULT_FILENAME" \ + --result-dir /workspace/ + +# After throughput, run evaluation only if RUN_EVAL is true +if [ "${RUN_EVAL}" = "true" ]; then + run_eval --framework lm-eval --port "$PORT" + append_lm_eval_summary +fi + +# Stop GPU monitoring +stop_gpu_monitor +set +x diff --git a/perf-changelog.yaml b/perf-changelog.yaml index 3f081c240..75fae41e3 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -1396,3 +1396,11 @@ - "Image: lmsysorg/sglang:v0.5.10.post1-cu130" - "TP=4, concurrency 4-256 for 1k1k and 8k1k" pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/1048 + +- config-keys: + - dsr1-fp4-b300-sglang + description: + - "Add DeepSeek-R1-0528 FP4 B300 SGLang benchmark (non-MTP)" + - "Image: lmsysorg/sglang:v0.5.10.post1-cu130" + - "At the time of submission, https://cookbook.sglang.io/autoregressive/DeepSeek/DeepSeek-R1 does not have a B300-specific recipe, so this reuses the existing DSR1 FP4 B200 SGLang recipe as-is" + pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/1049 diff --git a/runners/launch_b300-nv.sh b/runners/launch_b300-nv.sh index 3d863b54c..7c042b4f1 100644 --- a/runners/launch_b300-nv.sh +++ b/runners/launch_b300-nv.sh @@ -217,7 +217,12 @@ find . -name '.nfs*' -delete 2>/dev/null || true else HF_HUB_CACHE_MOUNT="/scratch/models" - export MODEL="/scratch/models/${MODEL#*/}" + # Qwen3.5-397B-A17B-FP8 is pre-staged under /scratch/models on the B300 cluster, + # so point MODEL at the local copy. Other models fall through and use `hf download` + # against the mounted cache from their benchmark script. + if [[ "$MODEL" == "Qwen/Qwen3.5-397B-A17B-FP8" ]]; then + export MODEL="/scratch/models/${MODEL#*/}" + fi SQUASH_FILE="/data/squash/$(echo "$IMAGE" | sed 's/[\/:@#]/_/g').sqsh" FRAMEWORK_SUFFIX=$([[ "$FRAMEWORK" == "trt" ]] && printf '_trt' || printf '') SPEC_SUFFIX=$([[ "$SPEC_DECODING" == "mtp" ]] && printf '_mtp' || printf '')