-
Notifications
You must be signed in to change notification settings - Fork 261
[AMD] [AGENTX] Qwen3.5 FP4 MI355X SGLang Agentic MTP / Qwen3.5 FP4 MI355X SGLang Agentic 数据集 MTP 基准配置 #2605
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
Changes from all commits
4bd577b
3caa99e
155d2a2
775b0bc
4ebaf8e
6702d3e
42b55a7
0a09bbf
fd04201
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,129 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
| set -x | ||
|
|
||
| # AgentX trace replay for Qwen3.5-397B-A17B MXFP4 on MI355X with SGLang | ||
| # native EAGLE MTP speculative decoding. Throughput uses the committed | ||
| # golden synthetic acceptance length; evaluation retains real target-model | ||
| # verification. | ||
|
|
||
| source "$(dirname "$0")/../../benchmark_lib.sh" | ||
|
|
||
| export EVAL_FRAMEWORK="lm-eval" | ||
|
|
||
| check_env_vars \ | ||
| MODEL TP CONC EP_SIZE RESULT_DIR DURATION | ||
|
|
||
| SCHEDULER_RECV_INTERVAL=${SCHEDULER_RECV_INTERVAL:-30} | ||
|
|
||
| if [[ -n "${SLURM_JOB_ID:-}" ]]; then | ||
| echo "JOB $SLURM_JOB_ID running on ${SLURMD_NODENAME:-unknown}" | ||
| fi | ||
|
|
||
| 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 | ||
|
|
||
| rocm-smi || true | ||
| amd-smi || true | ||
|
|
||
| export WEKA_LOADER_OVERRIDE=semianalysis_cc_traces_weka_062126_256k | ||
| resolve_trace_source | ||
| install_agentic_deps | ||
|
|
||
| export AIPERF_SERVER_METRICS_URLS="http://localhost:${PORT}/metrics" | ||
| export AIPERF_REQUIRED_SERVER_METRIC_PREFIX="sglang:" | ||
|
|
||
| SERVER_LOG="$RESULT_DIR/server.log" | ||
| mkdir -p "$RESULT_DIR" | ||
|
|
||
| SERVER_PID="" | ||
| cleanup_agentic_services() { | ||
| local exit_code=$? | ||
| trap - EXIT INT TERM | ||
| set +e | ||
| stop_background_process_tree "$SERVER_PID" "SGLang server" 60 | ||
| exit "$exit_code" | ||
| } | ||
| trap cleanup_agentic_services EXIT | ||
| trap 'exit 130' INT | ||
| trap 'exit 143' TERM | ||
|
|
||
| PARALLEL_ARGS=( | ||
| --tp "$TP" | ||
| --dp 1 | ||
| --ep-size "$EP_SIZE" | ||
| ) | ||
|
|
||
| TOKENIZER_ARGS=() | ||
| if [ "$TP" -ge 4 ]; then | ||
| TOKENIZER_ARGS=(--tokenizer-worker-num 6) | ||
| fi | ||
|
|
||
| MAX_RUNNING_REQUESTS=$((2 * CONC)) | ||
| CUDA_GRAPH_MAX_BS="$CONC" | ||
| [ "$CUDA_GRAPH_MAX_BS" -gt 64 ] && CUDA_GRAPH_MAX_BS=64 | ||
|
|
||
| export PYTHONNOUSERSITE=1 | ||
| export SGLANG_USE_AITER=1 | ||
| export SGLANG_USE_AITER_UNIFIED_ATTN=1 | ||
| export AITER_FLYDSL_FORCE=1 | ||
| export SGLANG_MAMBA_SSM_DTYPE=bfloat16 | ||
| export SGLANG_TIMEOUT_KEEP_ALIVE=1800 | ||
|
|
||
| if [ "${EVAL_ONLY:-false}" != "true" ]; then | ||
| export SGLANG_SIMULATE_ACC_LEN=3.61 | ||
| export SGLANG_SIMULATE_ACC_METHOD=match-expected | ||
| export SGLANG_SIMULATE_ACC_TOKEN_MODE=real-draft-token | ||
| fi | ||
|
|
||
| SGLANG_CMD=( | ||
| python3 -m sglang.launch_server | ||
| --model-path "$MODEL_PATH" | ||
| --served-model-name "$MODEL" | ||
| --host 0.0.0.0 | ||
| --port "$PORT" | ||
| --trust-remote-code | ||
| "${PARALLEL_ARGS[@]}" | ||
| --attention-backend aiter | ||
| --mem-fraction-static 0.80 | ||
| --model-loader-extra-config '{"enable_multithread_load": true}' | ||
| --watchdog-timeout 1200 | ||
| --page-size 16 | ||
| --cuda-graph-max-bs "$CUDA_GRAPH_MAX_BS" | ||
| --max-running-requests "$MAX_RUNNING_REQUESTS" | ||
| --max-prefill-tokens 32768 | ||
| --chunked-prefill-size 32768 | ||
| --scheduler-recv-interval "$SCHEDULER_RECV_INTERVAL" | ||
| --stream-interval 50 | ||
| "${TOKENIZER_ARGS[@]}" | ||
| --tokenizer-path "$MODEL" | ||
| --reasoning-parser qwen3 | ||
| --tool-call-parser qwen3_coder | ||
| --speculative-algorithm EAGLE | ||
| --speculative-num-steps 5 | ||
| --speculative-eagle-topk 1 | ||
| --speculative-num-draft-tokens 6 | ||
| --enable-metrics | ||
| --enable-cache-report | ||
| ) | ||
|
|
||
| printf '%q ' "${SGLANG_CMD[@]}" | tee "$RESULT_DIR/sglang_command.txt" | ||
| printf '\n' | tee -a "$RESULT_DIR/sglang_command.txt" | ||
| "${SGLANG_CMD[@]}" > "$SERVER_LOG" 2>&1 & | ||
| SERVER_PID=$! | ||
|
|
||
| wait_for_server_ready --port "$PORT" --server-log "$SERVER_LOG" --server-pid "$SERVER_PID" | ||
|
|
||
| if [ "${EVAL_ONLY:-false}" = "true" ]; then | ||
| run_eval --port "$PORT" | ||
| else | ||
| build_replay_cmd "$RESULT_DIR" | ||
| REPLAY_CMD+=" --apply-chat-template" | ||
| run_agentic_replay_and_write_outputs "$RESULT_DIR" | ||
| fi |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -361,6 +361,20 @@ qwen3.5-fp4-mi355x-sglang-mtp: | |
| - { tp: 2, conc-start: 4, conc-end: 128, spec-decoding: mtp } | ||
| - { tp: 4, conc-start: 4, conc-end: 16, spec-decoding: mtp } | ||
|
|
||
| qwen3.5-fp4-mi355x-sglang-agentic: | ||
| image: lmsysorg/sglang-rocm:v0.5.17-rocm720-mi35x-20260811 | ||
| model: amd/Qwen3.5-397B-A17B-MXFP4 | ||
| model-prefix: qwen3.5 | ||
| runner: cluster:mi355x-amds | ||
| precision: fp4 | ||
| framework: sglang | ||
| multinode: false | ||
| scenarios: | ||
| agentic-coding: | ||
| - dram-utilization: 0.80 | ||
| search-space: | ||
| - { tp: 4, ep: 4, spec-decoding: mtp, kv-offloading: dram, kv-offload-backend: { name: hicache }, conc-list: [1, 2, 4, 8, 10, 12, 16] } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Both new/updated search-space arms in Extended reasoning...The bug. Both arms this PR touches — the brand-new The new artifact never runs. This PR's actual new file, Step-by-step proof:
Impact. Every sweep run under either config key silently measures the old, unrelated speculative-decoding configuration rather than what the PR claims to add — acceptance-length and throughput numbers will not reflect the EAGLE MTP tuning or HiCache offloading the PR is meant to introduce, and the committed new script is permanently unreachable dead code as written. Fix. Rename |
||
|
|
||
|
Comment on lines
+364
to
+377
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 This PR adds a brand-new recipe ( Extended reasoning...AGENTS.md, under Non-negotiable benchmark invariants, states verbatim: 'Every change that can affect benchmark performance and every recipe addition or modification requires a new perf-changelog.yaml entry. The file is append-only and byte-sensitive... append only at the tail.' This is not a stylistic suggestion — it's called out as a non-negotiable invariant that gates recipe changes in this repository. This PR introduces a brand-new top-level config key, The PR diff touches exactly two files: the new benchmark script and Step-by-step proof:
Nothing in the diff suggests this recipe is exempt (e.g. it isn't a config-only tweak to an existing key — it's a wholly new entry with a companion script). The fix is straightforward: append a new entry at the tail of perf-changelog.yaml with
claude[bot] marked this conversation as resolved.
|
||
| qwen3.5-fp4-mi355x-sglang-agentic-mtp: | ||
| image: lmsysorg/sglang-rocm:v0.5.17-rocm720-mi35x-20260811 | ||
| model: amd/Qwen3.5-397B-A17B-MXFP4 | ||
|
|
@@ -373,8 +387,7 @@ qwen3.5-fp4-mi355x-sglang-agentic-mtp: | |
| agentic-coding: | ||
| - dram-utilization: 0.80 | ||
| search-space: | ||
| - { tp: 2, ep: 2, spec-decoding: mtp, kv-offloading: none, conc-list: [1, 4, 8, 12, 16, 20] } | ||
| - { tp: 4, ep: 1, spec-decoding: mtp, kv-offloading: none, conc-list: [1, 4, 8, 12, 16, 20, 24, 28, 32, 40] } | ||
| - { tp: 4, ep: 4, kv-offloading: dram, kv-offload-backend: { name: hicache }, conc-list: [1, 2, 4, 8, 10, 12, 16], spec-decoding: mtp } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 BLOCKING: Both arms now declare Why it matters: Fix: Add an equivalent |
||
|
|
||
| qwen3.5-fp4-mi355x-sglang-disagg: | ||
| image: lmsysorg/sglang-rocm:v0.5.12.post1-rocm720-mi35x-20260523 | ||
|
|
||
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.
🔴 BLOCKING: This new config is an exact functional duplicate of
qwen3.5-fp4-mi355x-sglang-agentic-mtp(line 403), and the new scriptbenchmarks/single_node/agentic/qwen3.5_fp4_mi355x_sglang.shis dead code that will never run.Why it matters: The launcher derives the script name from
SPEC_DECODING, not the config key —runners/launch_mi355x-amds.sh:260setsSPEC_SUFFIX=_mtpwheneverspec-decoding: mtp, and lines 307–314 then resolvebenchmarks/single_node/agentic/qwen3.5_fp4_mi355x_sglang_mtp.sh, which exists and wins. Since this arm setsspec-decoding: mtp, this config runs the old_mtp.shscript (num-steps=3, draft-tokens=4,SGLANG_SIMULATE_ACC_LEN=3.39) — the advertised num-steps=5 / draft-tokens=6 / AL=3.61 settings live only in the unreachable new script. Net effect: two config keys run the byte-identical benchmark (same image, model, TP4/EP4, HiCache, conc-list, same script), doubling GPU sweep time and publishing duplicate results, while none of the PR's stated MTP changes take effect.Fix: Apply the intended changes (num-steps 5, draft-tokens 6,
SGLANG_SIMULATE_ACC_LEN=3.61) directly tobenchmarks/single_node/agentic/qwen3.5_fp4_mi355x_sglang_mtp.sh, and delete this duplicate config key plus the newqwen3.5_fp4_mi355x_sglang.shscript. (Per MODELS.md, agentic recipes ship spec-decode-only, so a separate non--mtpagentic key isn't needed — and a key named-agenticwhose only arm is MTP is misleading either way.)