From 76f25d29ed5776e5f2d761b59c163601f3c94d22 Mon Sep 17 00:00:00 2001 From: functionstackx <47992694+functionstackx@users.noreply.github.com> Date: Sat, 18 Apr 2026 00:18:00 -0400 Subject: [PATCH] Add B200 config: glm5-fp4-sglang-mtp (draft) Follows the glm5-fp8-b200-sglang non-MTP launch recipe (as requested) and adds EAGLE speculative decoding (num-steps=3, eagle-topk=1, num-draft-tokens=4) via the standard spec-decoding=mtp suffix. SGLANG_ENABLE_SPEC_V2=1 is set before launching the server as required for GLM-5 MTP. Script also passes --use-chat-template to run_benchmark_serving, as required by AGENTS.md for all MTP configs. Config block uses the NVFP4 model (nvidia/GLM-5-NVFP4) and mirrors the existing glm5-fp4-b200-sglang search space. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/configs/nvidia-master.yaml | 20 +++++ benchmarks/single_node/glm5_fp4_b200_mtp.sh | 91 +++++++++++++++++++++ perf-changelog.yaml | 10 +++ 3 files changed, 121 insertions(+) create mode 100755 benchmarks/single_node/glm5_fp4_b200_mtp.sh diff --git a/.github/configs/nvidia-master.yaml b/.github/configs/nvidia-master.yaml index d37110ac5..162ab339d 100644 --- a/.github/configs/nvidia-master.yaml +++ b/.github/configs/nvidia-master.yaml @@ -1983,6 +1983,26 @@ glm5-fp4-b200-sglang: - { tp: 8, ep: 1, conc-start: 4, conc-end: 4 } - { tp: 4, ep: 1, conc-start: 4, conc-end: 256 } +glm5-fp4-b200-sglang-mtp: + image: lmsysorg/sglang:v0.5.10.post1-cu130 + model: nvidia/GLM-5-NVFP4 + model-prefix: glm5 + runner: b200 + precision: fp4 + framework: sglang + multinode: false + seq-len-configs: + - isl: 1024 + osl: 1024 + search-space: + - { tp: 8, ep: 1, conc-start: 4, conc-end: 4, spec-decoding: mtp } + - { tp: 4, ep: 1, conc-start: 4, conc-end: 256, spec-decoding: mtp } + - isl: 8192 + osl: 1024 + search-space: + - { tp: 8, ep: 1, conc-start: 4, conc-end: 4, spec-decoding: mtp } + - { tp: 4, ep: 1, conc-start: 4, conc-end: 256, spec-decoding: mtp } + # NOTE: At the time of submission, https://cookbook.sglang.io/autoregressive/GLM/GLM-5 # does not have a B300-specific recipe, so this config reuses the existing # GLM-5 FP4 B200 SGLang recipe as-is until B300-specific tuning is available. diff --git a/benchmarks/single_node/glm5_fp4_b200_mtp.sh b/benchmarks/single_node/glm5_fp4_b200_mtp.sh new file mode 100755 index 000000000..e57200ca6 --- /dev/null +++ b/benchmarks/single_node/glm5_fp4_b200_mtp.sh @@ -0,0 +1,91 @@ +#!/usr/bin/env bash + +source "$(dirname "$0")/../benchmark_lib.sh" + +check_env_vars \ + MODEL \ + TP \ + CONC \ + ISL \ + OSL \ + RANDOM_RANGE_RATIO \ + RESULT_FILENAME + +if [[ -n "$SLURM_JOB_ID" ]]; then + echo "JOB $SLURM_JOB_ID running on $SLURMD_NODENAME" +fi + +nvidia-smi + +hf download "$MODEL" + +pip install --no-deps "transformers==5.2.0" "huggingface-hub==1.4.1" + +export SGL_ENABLE_JIT_DEEPGEMM=1 +export SGLANG_ENABLE_SPEC_V2=1 + +SERVER_LOG=/workspace/server.log +PORT=${PORT:-8888} + + +echo "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 --expert-parallel-size 1 \ +--tool-call-parser glm47 \ +--reasoning-parser glm45 \ +--kv-cache-dtype fp8_e4m3 --quantization fp8 \ +--attention-backend nsa \ +--nsa-decode-backend trtllm --nsa-prefill-backend trtllm \ +--moe-runner-backend flashinfer_trtllm \ +--cuda-graph-max-bs $CONC --max-running-requests $CONC \ +--mem-fraction-static 0.85 \ +--chunked-prefill-size 32768 --max-prefill-tokens 32768 \ +--enable-flashinfer-allreduce-fusion --disable-radix-cache \ +--stream-interval 30 \ +--speculative-algorithm EAGLE \ +--speculative-num-steps 3 \ +--speculative-eagle-topk 1 \ +--speculative-num-draft-tokens 4 \ +--model-loader-extra-config '{"enable_multithread_load": true}' $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/ \ + --use-chat-template + +# 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 cfa6b359e..27859c44a 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -1596,3 +1596,13 @@ - "Mirrors the qwen3.5-fp4-b200-sglang non-MTP recipe and adds EAGLE speculative decoding (num-steps=3, eagle-topk=1, num-draft-tokens=4)" - "Configs: 1k1k and 8k1k, TP=4/EP=1 conc 4-128 with spec-decoding=mtp" pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/XXXX + +- config-keys: + - glm5-fp4-b200-sglang-mtp + description: + - "Add GLM-5 NVFP4 B200 SGLang MTP benchmark (draft)" + - "Image: lmsysorg/sglang:v0.5.10.post1-cu130" + - "Model: nvidia/GLM-5-NVFP4" + - "Follows the glm5-fp8-b200-sglang launch recipe as requested, plus EAGLE speculative decoding (num-steps=3, eagle-topk=1, num-draft-tokens=4) behind SGLANG_ENABLE_SPEC_V2=1" + - "Configs: 1k1k and 8k1k, TP8/EP1 conc 4-4 + TP4/EP1 conc 4-256 with spec-decoding=mtp" + pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/XXXX