Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 102 additions & 0 deletions benchmarks/single_node/fixed_seq_len/glm5_fp8_b300.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
#!/usr/bin/env bash

# NOTE: At the time of submission, https://cookbook.sglang.io/autoregressive/GLM/GLM-5.1
# does not have a B300-specific recipe, so this script reuses the GLM5 FP8
# B200 SGLang recipe until B300-specific guidance is available.

source "$(dirname "$0")/../../benchmark_lib.sh"

check_env_vars \
MODEL \
TP \
CONC \
ISL \
OSL \
RANDOM_RANGE_RATIO \
RESULT_FILENAME

# `hf download` creates the target directory if needed and is idempotent.
# When MODEL_PATH is unset for a stand-alone run, fall back to the HF cache.
if [[ -n "${MODEL_PATH:-}" ]]; then
if [[ ! -d "$MODEL_PATH" || -z "$(ls -A "$MODEL_PATH" 2>/dev/null)" ]]; then
hf download "$MODEL" --local-dir "$MODEL_PATH"
fi
else
hf download "$MODEL"
export MODEL_PATH="$MODEL"
fi

if [[ -n "$SLURM_JOB_ID" ]]; then
echo "JOB $SLURM_JOB_ID running on $SLURMD_NODENAME"
fi

nvidia-smi

export SGLANG_ENABLE_JIT_DEEPGEMM=1

SERVER_LOG=/workspace/server.log

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_monitor

set -x
PYTHONNOUSERSITE=1 python3 -m sglang.launch_server \
--model-path "$MODEL_PATH" \
--served-model-name "$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 \
--model-loader-extra-config '{"enable_multithread_load": true}' \
$EVAL_CONTEXT_ARGS > "$SERVER_LOG" 2>&1 &

SERVER_PID=$!

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/

if [[ "${RUN_EVAL}" == "true" ]]; then
run_eval --framework lm-eval --port "$PORT"
append_lm_eval_summary
fi

stop_gpu_monitor
set +x
108 changes: 108 additions & 0 deletions benchmarks/single_node/fixed_seq_len/glm5_fp8_b300_mtp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
#!/usr/bin/env bash

# NOTE: At the time of submission, https://cookbook.sglang.io/autoregressive/GLM/GLM-5.1
# does not have a B300-specific recipe, so this script reuses the GLM5 FP8
# B200 SGLang recipe until B300-specific guidance is available.

source "$(dirname "$0")/../../benchmark_lib.sh"

check_env_vars \
MODEL \
TP \
CONC \
ISL \
OSL \
RANDOM_RANGE_RATIO \
RESULT_FILENAME

# `hf download` creates the target directory if needed and is idempotent.
# When MODEL_PATH is unset for a stand-alone run, fall back to the HF cache.
if [[ -n "${MODEL_PATH:-}" ]]; then
if [[ ! -d "$MODEL_PATH" || -z "$(ls -A "$MODEL_PATH" 2>/dev/null)" ]]; then
hf download "$MODEL" --local-dir "$MODEL_PATH"
fi
else
hf download "$MODEL"
export MODEL_PATH="$MODEL"
fi

if [[ -n "$SLURM_JOB_ID" ]]; then
echo "JOB $SLURM_JOB_ID running on $SLURMD_NODENAME"
fi

nvidia-smi

export SGLANG_ENABLE_JIT_DEEPGEMM=1
export SGLANG_ENABLE_SPEC_V2=1

SERVER_LOG=/workspace/server.log

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_monitor

set -x
PYTHONNOUSERSITE=1 python3 -m sglang.launch_server \
--model-path "$MODEL_PATH" \
--served-model-name "$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_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

if [[ "${RUN_EVAL}" == "true" ]]; then
run_eval --framework lm-eval --port "$PORT"
append_lm_eval_summary
fi

stop_gpu_monitor
set +x
34 changes: 34 additions & 0 deletions configs/nvidia-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1281,6 +1281,40 @@ qwen3.5-fp4-b200-sglang-mtp:
- { tp: 4, ep: 1, conc-start: 4, conc-end: 4, spec-decoding: mtp }
- { tp: 2, ep: 1, conc-start: 4, conc-end: 64, spec-decoding: mtp }

# NOTE: At the time of submission, https://cookbook.sglang.io/autoregressive/GLM/GLM-5.1
# does not have a B300-specific recipe, so these configs reuse the GLM5 FP8
# B200 SGLang recipe until B300-specific guidance is available.

glm5-fp8-b300-sglang:
image: lmsysorg/sglang:v0.5.15.post1-cu130
model: zai-org/GLM-5.1-FP8
model-prefix: glm5
runner: b300
precision: fp8
framework: sglang
multinode: false
scenarios:
fixed-seq-len:
- isl: 8192
osl: 1024
search-space:
- { tp: 8, ep: 1, conc-start: 4, conc-end: 256 }
Comment on lines +1288 to +1301

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 The new config sets model-prefix: glm5 for model zai-org/GLM-5.1-FP8, but every other GLM-5.1 config in the repo uses glm5.1 — GLM-5 and GLM-5.1 are distinct models. Because the deprecated glm5-fp8-b300-sglang config for the unrelated zai-org/GLM-5-FP8 model used the identical prefix glm5 with the same runner/tp/ep/isl/osl/conc, utils/compare_results.py's baseline lookup (a prefix LIKE match) will silently pick historical GLM-5 rows as the regression baseline for this GLM-5.1 config. Should be model-prefix: glm5.1.

Extended reasoning...

The bug: configs/nvidia-master.yaml sets model: zai-org/GLM-5.1-FP8 but model-prefix: glm5 (line ~1291). Every other GLM-5.1-FP8/GLM-5.1-NVFP4 entry in the repo (e.g. configs/deprecated/nvidia-glm5-glm5.1-master.yaml lines 650, 957, 1261, 1382, 1525, 1782) uses model-prefix: glm5.1, while GLM-5 (non-5.1) entries use glm5. This new config breaks that convention, using the GLM-5 prefix for a GLM-5.1 model.

Code path: The model-prefix YAML field flows through generate_sweep_configs.py into the MODEL_PREFIX env var, then into infmax_model_prefix in the result JSON written by benchmark_lib.sh. utils/compare_results.py reads this value (model = result['infmax_model_prefix'].lower()) and uses it in its regression-baseline query:

WHERE ... AND c.model LIKE %(model)s || '%%' ...
ORDER BY br.date DESC LIMIT 1

With model = 'glm5', this becomes LIKE 'glm5%', which matches BOTH 'glm5' and 'glm5.1' rows in the DB, since 'glm5' is a literal prefix of 'glm5.1'.

Why this causes contamination, concretely: The deprecated config key glm5-fp8-b300-sglang previously existed in configs/deprecated/nvidia-glm5-glm5.1-master.yaml (lines 40-53) for the distinct model zai-org/GLM-5-FP8, also with model-prefix: glm5, and identical hardware/framework/precision/tp/ep/isl/osl/conc (b300/sglang/fp8/tp8/ep1/isl8192/osl1024/conc 4-256). Every other column in BASELINE_QUERY's WHERE clause matches between the old GLM-5 rows and this new GLM-5.1 config. So:

  1. The new GLM-5.1 sweep runs and writes a result with c.model = 'glm5' (from infmax_model_prefix).
  2. compare_results.py runs its baseline query with model = 'glm5', i.e. LIKE 'glm5%'.
  3. If any historical main-branch row exists with c.model = 'glm5' from the old GLM-5 (not 5.1) config, it satisfies every filter and ORDER BY date DESC LIMIT 1 picks it as 'the' baseline.
  4. The regression report silently compares GLM-5.1 throughput/latency numbers against an unrelated GLM-5 model's historical numbers, instead of correctly reporting 'no baseline' for this first GLM-5.1 B300 SGLang run.

If model-prefix were correctly set to glm5.1, the query would be LIKE 'glm5.1%', which does not match plain 'glm5' rows (since 'glm5' does not start with 'glm5.1'), correctly isolating GLM-5.1 baselines from GLM-5 ones.

Why nothing else catches this: The WHERE clause intentionally uses a prefix LIKE match (per the comment above BASELINE_QUERY) to handle cases like model-prefix: gptoss matching DB model gptoss120b — a legitimate use of prefix matching for suffix variation. That same permissiveness backfires here because glm5 is also a valid, distinct model family name that is a literal string-prefix of glm5.1. There's no additional disambiguation column (e.g. exact model name) in the baseline query to prevent this collision.

Fix: change model-prefix: glm5 to model-prefix: glm5.1 in this new config entry, consistent with every other GLM-5.1 config in the repository. Separately, this also means results from this config would otherwise be permanently mislabeled under the glm5 model family in the results DB, independent of the baseline-lookup issue.


glm5-fp8-b300-sglang-mtp:
image: lmsysorg/sglang:v0.5.15.post1-cu130
model: zai-org/GLM-5.1-FP8
model-prefix: glm5
runner: b300
precision: fp8
framework: sglang
multinode: false
scenarios:
fixed-seq-len:
- isl: 8192
osl: 1024
search-space:
- { tp: 8, ep: 1, conc-start: 4, conc-end: 256, spec-decoding: mtp }

qwen3.5-fp8-b200-sglang-mtp:
image: lmsysorg/sglang:v0.5.14-cu130
model: Qwen/Qwen3.5-397B-A17B-FP8
Expand Down
20 changes: 20 additions & 0 deletions perf-changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5060,3 +5060,23 @@
- "Re-pin VLLM_ROUTER_IMAGE to vllm/vllm-router:nightly-20260716-1fbcde7 (previous nightly-20260629-e667ebb was garbage-collected from Docker Hub)"
- "Exclude known-bad nodes mia1-p01-g09,g14 from the disagg node pool"
pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2301

- config-keys:
- glm5-fp8-b300-sglang
description:
- "Add the GLM-5.1 FP8 B300 SGLang configuration with the lmsysorg/sglang:v0.5.15.post1-cu130 image"
- "新增 GLM-5.1 FP8 B300 SGLang 配置,并使用 lmsysorg/sglang:v0.5.15.post1-cu130 镜像"
- "Use the writable /data/models/GLM-5.1-FP8 cache when the model is not pre-staged"
- "模型未预置时,使用可写的 /data/models/GLM-5.1-FP8 缓存"
pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2320

- config-keys:
- glm5-fp8-b300-sglang-mtp
description:
- "Add the GLM-5.1 FP8 B300 SGLang MTP configuration with the lmsysorg/sglang:v0.5.15.post1-cu130 image"
- "新增 GLM-5.1 FP8 B300 SGLang MTP 配置,并使用 lmsysorg/sglang:v0.5.15.post1-cu130 镜像"
- "Enable EAGLE speculative decoding and use the chat template for benchmark requests"
- "启用 EAGLE 投机解码,并为基准测试请求使用聊天模板"
- "Use the writable /data/models/GLM-5.1-FP8 cache when the model is not pre-staged"
- "模型未预置时,使用可写的 /data/models/GLM-5.1-FP8 缓存"
pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2320
Loading