-
Notifications
You must be signed in to change notification settings - Fork 156
Add B300 config: glm5-fp4-sglang #1058
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # NOTE: At the time of submission, https://cookbook.sglang.io/autoregressive/GLM/GLM-5 | ||
| # does not have a B300-specific recipe, so this script reuses the existing | ||
| # GLM-5 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 | ||
|
|
||
| nvidia-smi | ||
|
|
||
| hf download "$MODEL" | ||
|
|
||
| SERVER_LOG=/workspace/server.log | ||
| PORT=${PORT:-8888} | ||
|
|
||
| echo "EP_SIZE: $EP_SIZE, 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 $EP_SIZE \ | ||
| --disable-radix-cache \ | ||
| --quantization modelopt_fp4 \ | ||
| --kv-cache-dtype fp8_e4m3 \ | ||
| --nsa-decode-backend trtllm \ | ||
| --nsa-prefill-backend trtllm \ | ||
| --moe-runner-backend flashinfer_trtllm \ | ||
| --enable-flashinfer-allreduce-fusion \ | ||
| --cuda-graph-max-bs 256 \ | ||
| --max-prefill-tokens 32768 \ | ||
| --chunked-prefill-size 32768 \ | ||
| --mem-fraction-static 0.9 \ | ||
| --stream-interval 30 \ | ||
| --scheduler-recv-interval 10 \ | ||
| --tokenizer-worker-num 6 \ | ||
| --tokenizer-path $MODEL $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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 The
perf-changelog.yamlentry forglm5-fp4-b300-sglanghaspr-linkset to.../pull/XXXXinstead of the actual PR number.../pull/1058. This should be corrected so the changelog permanently records the correct link.Extended reasoning...
What the bug is and how it manifests
The
perf-changelog.yamlentry forglm5-fp4-b300-sglang(the entry added by this PR) uses a placeholder valueXXXXin thepr-linkfield instead of the actual PR number 1058. The field currently reads:The specific code path that triggers it
The affected entry is the last entry in
perf-changelog.yaml(line 1414), introduced by this PR. The PR diff itself shows the intended value as/pull/1058, but the code committed tomainat commit82d44b0still contains the placeholder/XXXX.Why existing code does not prevent it
There is no automated validation that checks
perf-changelog.yamlpr-linkfields for unreplaced placeholders likeXXXX. The CI config validation would pass since the YAML is syntactically valid — the placeholder is just a wrong URL string.Impact
The changelog will permanently record a broken link for this entry. Anyone referencing the changelog to find the PR that introduced the
glm5-fp4-b300-sglangconfig will be directed to a non-existent GitHub URL instead of PR #1058.How to fix it
Replace
XXXXwith1058in thepr-linkfield:Step-by-step proof
perf-changelog.yaml) shows the added line as+ pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/1058.82d44b0) shows the last entry'spr-linkashttps://github.com/SemiAnalysisAI/InferenceX/pull/XXXX.dsr1-fp4-b300-sglangentry directly above (from PR Add B300 config: dsr1-fp4-sglang (non-MTP) #1049) correctly reads/pull/1049.XXXXwas not replaced before the commit landed onmain.