-
Notifications
You must be signed in to change notification settings - Fork 176
[Handoff to @Oseltamivir Claude /loop] [Klaud Cold] Add qwen3.5-fp8-mi300x-sglang-mtp recipe #1482
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
Open
functionstackx
wants to merge
2
commits into
main
Choose a base branch
from
add-qwen3.5-fp8-mi300x-sglang-mtp
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+109
−0
Open
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,84 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| 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 | ||
|
|
||
| if [[ "$MODEL" != /* ]]; then hf download "$MODEL"; fi | ||
|
|
||
| SERVER_LOG=/workspace/server.log | ||
| PORT=${PORT:-8888} | ||
| CONTEXT_LENGTH=$((ISL + OSL + 20)) | ||
| MAX_PREFILL_TOKENS=32768 | ||
|
|
||
| EVAL_CONTEXT_ARGS="" | ||
| if [ "${EVAL_ONLY}" = "true" ]; then | ||
| setup_eval_context | ||
| EVAL_CONTEXT_ARGS="--context-length $EVAL_MAX_MODEL_LEN" | ||
| else EVAL_CONTEXT_ARGS="--context-length $CONTEXT_LENGTH" | ||
| fi | ||
| # Start GPU monitoring (power, temperature, clocks every second) | ||
| start_gpu_monitor | ||
|
|
||
| # following AMD Andy linkedin's recipe | ||
| # https://www.linkedin.com/feed/update/urn:li:activity:7429203734389280768/ | ||
| python3 -m sglang.launch_server \ | ||
| --attention-backend aiter \ | ||
| --model-path $MODEL \ | ||
| --host=0.0.0.0 \ | ||
| --port $PORT \ | ||
| --tensor-parallel-size $TP \ | ||
| --ep-size $EP_SIZE \ | ||
| --trust-remote-code \ | ||
| --tokenizer-worker-num 6 \ | ||
| --enable-aiter-allreduce-fusion \ | ||
| --cuda-graph-max-bs $CONC \ | ||
| --disable-radix-cache \ | ||
| --max-prefill-tokens $MAX_PREFILL_TOKENS \ | ||
| --scheduler-recv-interval 30 \ | ||
| --speculative-algorithm EAGLE \ | ||
| --speculative-num-steps 3 \ | ||
| --speculative-eagle-topk 1 \ | ||
| --speculative-num-draft-tokens 4 \ | ||
| --mem-fraction-static 0.75 $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" \ | ||
| EP_SIZE \ | ||
| --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 | ||
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 new
qwen3.5_fp8_mi300x_mtp.shrecipe has two copy-paste defects that together prevent it from running: (1) a misplaced backslash at lines 12-13 makescheck_env_varsend afterRESULT_FILENAMEand then tries to execute a command literally namedEP_SIZE, leaving$EP_SIZEunvalidated; and (2) a strayEP_SIZE \at line 72 insiderun_benchmark_servingis parsed as a positional argument that hits the function's wildcard case and aborts the benchmark. Fix by moving the backslash up toRESULT_FILENAME\and dropping it afterEP_SIZE(lines 12-13), and by deleting line 72 entirely — see the siblingqwen3.5_fp8_mi355x_mtp.shfor the correct structure.Extended reasoning...
What is broken
The new script
benchmarks/single_node/qwen3.5_fp8_mi300x_mtp.shcontains two distinctEP_SIZE-related copy-paste defects. Both can be seen by comparing against the siblingbenchmarks/single_node/qwen3.5_fp8_mi355x_mtp.sh, which has the correct shape.Defect 1 — broken
check_env_varscall (lines 5-13).In the new file:
check_env_vars \ MODEL \ ... RESULT_FILENAME # <-- NO trailing backslash, terminates check_env_vars EP_SIZE \ # <-- starts a NEW command, backslash continues to blank line 14In the (correct) mi355x sibling at lines 12-13:
RESULT_FILENAME \ EP_SIZEDefect 2 — stray positional inside
run_benchmark_serving(line 72).run_benchmark_serving \ ... --result-filename "$RESULT_FILENAME" \ EP_SIZE \ # <-- stray literal, no `$`, no flag --result-dir /workspace/ \ --use-chat-templateThe mi355x sibling has no such line.
Step-by-step proof of failure
Assume the harness invokes the script with
EP_SIZEexported (every yaml entry setsep: 1, so this is the intended happy path):check_env_varsruns with argumentsMODEL TP CONC ISL OSL RANDOM_RANGE_RATIO RESULT_FILENAME. All set, so it passes.EP_SIZEis never validated (a real but latent fail-fast regression for the unset-EP_SIZEcase).EP_SIZE \as its own statement. The trailing backslash continues onto the blank line 14, so the resulting command is literallyEP_SIZEwith no arguments. There is no such command on$PATH, so bash printsEP_SIZE: command not found. The script does notset -e(onlyset +xat the bottom), so execution silently continues.EP_SIZE=1was exported).run_benchmark_servingis invoked. Its argument loop inbenchmarks/benchmark_lib.sh(the second one starting around line 187) is a strictwhile [[ $# -gt 0 ]]; do case $1 in ... *) echo "Unknown parameter: $1"; return 1; ;; esac done. The preceding--result-filename "$RESULT_FILENAME"does ashift 2, so when the loop next sees$1 = "EP_SIZE"(the bare string from line 72), it hits the wildcard at lib.sh:279-282 and returns 1. The benchmark client never runs; no perf data is produced.set -eis not active, so the script continues intorun_eval/stop_gpu_monitorand exits 0 fromset +x. The CI job appears to succeed but produced no benchmark output.Why the broken state is exactly the wrong way around
The
EP_SIZE \artifact appears in both locations (line 13 and line 72), strongly suggesting both were introduced by the same bad insertion. The siblingqwen3.5_fp8_mi355x_mtp.sh(lines 12-13 and 60-72) has neither artifact.Fix
Three edits in
benchmarks/single_node/qwen3.5_fp8_mi300x_mtp.sh:RESULT_FILENAME→RESULT_FILENAME \EP_SIZE \→EP_SIZE(final argument tocheck_env_vars)EP_SIZE \) entirely —$EP_SIZEis already consumed by--ep-size $EP_SIZEon line 43 and has no business being passed to the benchmark client.After these three edits,
bash -ncontinues to pass and the recipe actually has a chance of producing benchmark results on the first sweep run.