From e8ffa8347c992c06ea26fab68035d7491873d23a Mon Sep 17 00:00:00 2001 From: Liu Date: Fri, 1 May 2026 14:48:24 +0100 Subject: [PATCH] [AMD][ROCM] Add MI355X config: glm5-fp4-mi355x-sglang-mtp - Add `glm5-fp4-mi355x-sglang-mtp` config to amd-master.yaml. - Add benchmarks/single_node/glm5_fp4_mi355x_mtp.sh launch script. - Image: lmsysorg/sglang-rocm:v0.5.10.post1-rocm700-mi35x-20260428 - Model: amd/GLM-5-MXFP4 (TP=8, FP4/quark quantization) - EAGLE MTP speculative decoding: num-steps=3, eagle-topk=1, num-draft-tokens=4, behind SGLANG_ENABLE_SPEC_V2=1 - Search space: 1k1k and 8k1k, conc 4-64, spec-decoding=mtp - Append perf-changelog.yaml entry. Co-Authored-By: Claude Sonnet 4.6 --- .github/configs/amd-master.yaml | 18 +++++ benchmarks/single_node/glm5_fp4_mi355x_mtp.sh | 78 +++++++++++++++++++ perf-changelog.yaml | 12 +++ 3 files changed, 108 insertions(+) create mode 100644 benchmarks/single_node/glm5_fp4_mi355x_mtp.sh diff --git a/.github/configs/amd-master.yaml b/.github/configs/amd-master.yaml index 893210ef6..25cc0ef22 100644 --- a/.github/configs/amd-master.yaml +++ b/.github/configs/amd-master.yaml @@ -381,6 +381,24 @@ glm5-fp8-mi355x-sglang-mtp: search-space: - { tp: 8, conc-start: 4, conc-end: 64, spec-decoding: mtp } +glm5-fp4-mi355x-sglang-mtp: + image: lmsysorg/sglang-rocm:v0.5.10.post1-rocm700-mi35x-20260428 + model: amd/GLM-5-MXFP4 + model-prefix: glm5 + runner: mi355x + precision: fp4 + framework: sglang + multinode: false + seq-len-configs: + - isl: 1024 + osl: 1024 + search-space: + - { tp: 8, conc-start: 4, conc-end: 64, spec-decoding: mtp } + - isl: 8192 + osl: 1024 + search-space: + - { tp: 8, conc-start: 4, conc-end: 64, spec-decoding: mtp } + glm5-fp8-mi355x-atom: image: rocm/atom:rocm7.2.2_ubuntu24.04_py3.12_pytorch_release_2.10.0_atom0.1.2.post model: zai-org/GLM-5-FP8 diff --git a/benchmarks/single_node/glm5_fp4_mi355x_mtp.sh b/benchmarks/single_node/glm5_fp4_mi355x_mtp.sh new file mode 100644 index 000000000..bdb2452ad --- /dev/null +++ b/benchmarks/single_node/glm5_fp4_mi355x_mtp.sh @@ -0,0 +1,78 @@ +#!/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 + +hf download "$MODEL" + +export SGLANG_ENABLE_SPEC_V2=1 + +SERVER_LOG=/workspace/server.log +PORT=${PORT:-8888} + +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 + +python3 -m sglang.launch_server \ + --model-path $MODEL \ + --host=0.0.0.0 \ + --port $PORT \ + --trust-remote-code \ + --tp $TP \ + --chunked-prefill-size 131072 \ + --disable-radix-cache \ + --mem-fraction-static 0.85 \ + --model-loader-extra-config '{"enable_multithread_load": true}' \ + --watchdog-timeout 1200 \ + --reasoning-parser glm45 \ + --tool-call-parser glm47 \ + --speculative-algorithm EAGLE \ + --speculative-num-steps 3 \ + --speculative-eagle-topk 1 \ + --speculative-num-draft-tokens 4 \ + $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" + +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 0403c2385..ff1872c92 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -2069,3 +2069,15 @@ - "Recipes cover 8k/1k aggregate TP8 low-latency conc=1, low-latency bridge 1P DEP8 + 4D TP8 no-offload conc=16/32/64, mid 1P/1D DEP8 MegaMOE conc=128, and high-throughput 2P/1D DEP8 MegaMOE conc=1024" - "All recipes enable FP4 indexer cache and speculative-config mtp with num_speculative_tokens=2" pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/1242 + +- config-keys: + - glm5-fp4-mi355x-sglang-mtp + description: + - "Add GLM-5 MXFP4 MI355X SGLang MTP benchmark" + - "Image: lmsysorg/sglang-rocm:v0.5.10.post1-rocm700-mi35x-20260428" + - "Model: amd/GLM-5-MXFP4" + - "EAGLE speculative decoding (num-steps=3, eagle-topk=1, num-draft-tokens=4) behind SGLANG_ENABLE_SPEC_V2=1" + - "Image ships transformers with glm_moe_dsa support, so no extra pip install is needed (unlike glm5-fp8-mi355x-sglang)" + - "Configs: 1k1k and 8k1k, TP=8 conc 4-64 with spec-decoding=mtp" + - "Requires benchmark_serving.py tokenizer fix: https://github.com/SemiAnalysisAI/InferenceX/pull/1253" + pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/1254