From 500775bc3d1bdbed85dfaad6ba1bdc61351400ab Mon Sep 17 00:00:00 2001 From: functionstackx <47992694+functionstackx@users.noreply.github.com> Date: Wed, 26 Aug 2026 23:08:46 -0400 Subject: [PATCH 1/7] qwen3.8next-fp8-mi355x-sglang-agentic: day-zero Qwen3.8-Flash-Next AgentX on MI355X MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add the Qwen3.8-Flash-Next AgentX recipe on MI355X, served by SGLang. Two differences from the NVIDIA arms: no speculative decoding, because the MI355X SGLang path for this model does not drive MTP yet, so this arm runs the target model alone and carries no synthetic-acceptance pin; and FP8 rather than FP4, because no AMD FP4 checkpoint exists for this model yet. TP4 puts the 172.8 GiB checkpoint at about 43 GiB per rank. 新增 MI355X 上的 Qwen3.8-Flash-Next AgentX 配方,由 SGLang 提供服务。与 NVIDIA 分支有两点不同:其一,不启用投机解码——MI355X 上该模型的 SGLang 路径尚不支持 MTP,故本分支仅运行目标模型,也不设置合成接受长度;其二,使用 FP8 而非 FP4, 因为该模型目前没有 AMD FP4 权重。TP4 下每卡权重约 43 GiB。 Co-Authored-By: Claude Opus 5 (1M context) --- .../agentic/qwen3.8next_fp8_mi355x_sglang.sh | 138 ++++++++++++++++++ configs/amd-master.yaml | 18 +++ perf-changelog.yaml | 9 ++ 3 files changed, 165 insertions(+) create mode 100755 benchmarks/single_node/agentic/qwen3.8next_fp8_mi355x_sglang.sh diff --git a/benchmarks/single_node/agentic/qwen3.8next_fp8_mi355x_sglang.sh b/benchmarks/single_node/agentic/qwen3.8next_fp8_mi355x_sglang.sh new file mode 100755 index 0000000000..f432ef9709 --- /dev/null +++ b/benchmarks/single_node/agentic/qwen3.8next_fp8_mi355x_sglang.sh @@ -0,0 +1,138 @@ +#!/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. 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 KV_OFFLOADING \ + TOTAL_CPU_DRAM_GB 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 + +CACHE_ARGS=() +if require_agentic_kv_offload_backend hicache; then + HICACHE_RATIO="${HICACHE_RATIO:-1.5}" + HICACHE_WRITE_POLICY="${HICACHE_WRITE_POLICY:-write_through}" + HICACHE_IO_BACKEND="${HICACHE_IO_BACKEND:-direct}" + HICACHE_MEM_LAYOUT="${HICACHE_MEM_LAYOUT:-page_first_direct}" + echo "HiCache CPU tier: ratio=$HICACHE_RATIO, write_policy=$HICACHE_WRITE_POLICY, io_backend=$HICACHE_IO_BACKEND, mem_layout=$HICACHE_MEM_LAYOUT, dram_budget=${TOTAL_CPU_DRAM_GB} GB, tp=$TP" + CACHE_ARGS=( + --enable-hierarchical-cache + --hicache-ratio "$HICACHE_RATIO" + --hicache-write-policy "$HICACHE_WRITE_POLICY" + --hicache-io-backend "$HICACHE_IO_BACKEND" + --hicache-mem-layout "$HICACHE_MEM_LAYOUT" + ) +fi + +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 + + +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 + --kv-cache-dtype fp8_e4m3 + --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 + --enable-metrics + --enable-cache-report + "${CACHE_ARGS[@]}" +) + +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 diff --git a/configs/amd-master.yaml b/configs/amd-master.yaml index acf6efef1a..88be008379 100644 --- a/configs/amd-master.yaml +++ b/configs/amd-master.yaml @@ -377,6 +377,24 @@ qwen3.5-fp4-mi355x-sglang-agentic-mtp: - { tp: 4, ep: 1, spec-decoding: mtp, kv-offloading: dram, kv-offload-backend: { name: hicache }, conc-list: [40, 48, 56, 64] } - { tp: 2, ep: 1, spec-decoding: mtp, kv-offloading: dram, kv-offload-backend: { name: hicache }, conc-list: [20, 24, 28, 32] } + +# Qwen3.8-Flash-Next FP8 AgentX on MI355X via SGLang, without speculative +# decoding: the MI355X SGLang path for this model does not drive MTP yet, so +# this arm runs the target model alone and carries no synthetic-acceptance pin. +# FP8 because there is no AMD FP4 checkpoint for this model yet. +qwen3.8next-fp8-mi355x-sglang-agentic: + image: lmsysorg/sglang-rocm:qwen38flashnext + model: Qwen/Qwen3.8-Flash-Next-FP8 + model-prefix: qwen3.8next + runner: cluster:mi355x-amds + precision: fp8 + framework: sglang + multinode: false + scenarios: + agentic-coding: + - dram-utilization: 0.8 + search-space: + - { tp: 4, ep: 1, kv-offloading: none, conc-list: [1, 4, 8, 12, 16] } qwen3.5-fp4-mi355x-sglang-disagg: image: lmsysorg/sglang-rocm:v0.5.12.post1-rocm720-mi35x-20260523 model: amd/Qwen3.5-397B-A17B-MXFP4 diff --git a/perf-changelog.yaml b/perf-changelog.yaml index de9533314a..4578296201 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -6490,3 +6490,12 @@ - "Required lanes promote exporter startup timeouts, launch failures, and endpoint resolution failures to blocking validation failures, so a recipe cannot publish a result whose power collection never started." - "Route only enabled recipes through the immutable producer fork and preserve non-power launcher revisions." pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2688 +- config-keys: + - qwen3.8next-fp8-mi355x-sglang-agentic + scenario-type: + - agentic-coding + description: + - "Add the day-zero Qwen3.8-Flash-Next FP8 AgentX recipe on MI355X with SGLang at TP4 and concurrency 1/4/8/12/16." + - "Run without speculative decoding because the MI355X SGLang path for this model does not drive MTP yet, so this arm carries no synthetic-acceptance pin." + - "Serve the FP8 checkpoint because no AMD FP4 checkpoint exists for this model yet." + pr-link: TBD From 6089c50635922f8ec4ddf864944bf1c4d879fef0 Mon Sep 17 00:00:00 2001 From: functionstackx <47992694+functionstackx@users.noreply.github.com> Date: Wed, 26 Aug 2026 23:08:57 -0400 Subject: [PATCH 2/7] =?UTF-8?q?Fill=20perf-changelog=20pr-link=20for=20#27?= =?UTF-8?q?54=20/=20=E8=A1=A5=E5=85=A8=20#2754=20=E7=9A=84=20perf-changelo?= =?UTF-8?q?g=20pr-link?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5 (1M context) --- perf-changelog.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perf-changelog.yaml b/perf-changelog.yaml index 4578296201..b758397825 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -6498,4 +6498,4 @@ - "Add the day-zero Qwen3.8-Flash-Next FP8 AgentX recipe on MI355X with SGLang at TP4 and concurrency 1/4/8/12/16." - "Run without speculative decoding because the MI355X SGLang path for this model does not drive MTP yet, so this arm carries no synthetic-acceptance pin." - "Serve the FP8 checkpoint because no AMD FP4 checkpoint exists for this model yet." - pr-link: TBD + pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2754 From ac8723748717c5071af2a2f3cd24500603eae396 Mon Sep 17 00:00:00 2001 From: functionstackx <47992694+functionstackx@users.noreply.github.com> Date: Wed, 26 Aug 2026 23:29:31 -0400 Subject: [PATCH 3/7] Use the cookbook's verified TP8 balanced command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The recipe was copied from the Qwen3.5 MXFP4 MI355X sibling and inherited its flags. The SGLang cookbook playground's verified command for Qwen3.8-Flash-Next on MI355X is FP8, balanced, single node at --tp-size 8, with page size 32, automatic KV cache dtype rather than fp8_e4m3, chunked prefill 16384, memory fraction 0.9, watchdog 1200 and multithreaded model loading. Low-latency and high-throughput strategies are not offered for this part and NVFP4 is greyed out, so this is the whole verified AMD surface for the model today. Still no speculative decoding. 本配方原样照搬自 Qwen3.5 MXFP4 MI355X 同类配方并带入了其参数。SGLang cookbook playground 给出的 Qwen3.8-Flash-Next MI355X 验证命令为 FP8、balanced、单节点、 --tp-size 8,并使用 page size 32、KV 缓存 dtype 为 auto(而非 fp8_e4m3)、 chunked prefill 16384、显存占用 0.9、watchdog 1200 以及多线程权重加载。该硬件上 不提供 low-latency 与 high-throughput 策略,NVFP4 亦不可用,因此这就是该模型目前 在 AMD 上全部的已验证配置面。仍不启用投机解码。 Co-Authored-By: Claude Opus 5 (1M context) --- .../agentic/qwen3.8next_fp8_mi355x_sglang.sh | 23 ++++++++++--------- configs/amd-master.yaml | 5 ++-- perf-changelog.yaml | 3 ++- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/benchmarks/single_node/agentic/qwen3.8next_fp8_mi355x_sglang.sh b/benchmarks/single_node/agentic/qwen3.8next_fp8_mi355x_sglang.sh index f432ef9709..f066e8de38 100755 --- a/benchmarks/single_node/agentic/qwen3.8next_fp8_mi355x_sglang.sh +++ b/benchmarks/single_node/agentic/qwen3.8next_fp8_mi355x_sglang.sh @@ -100,23 +100,24 @@ SGLANG_CMD=( --host 0.0.0.0 --port "$PORT" --trust-remote-code - "${PARALLEL_ARGS[@]}" + # Verified flags from the SGLang cookbook playground for this model on + # MI355X / FP8 / balanced / single node. Low-latency and high-throughput + # are not offered for this part, and NVFP4 is greyed out, so balanced FP8 + # at TP8 is the whole of the verified AMD surface today. + --tp-size "$TP" --attention-backend aiter - --mem-fraction-static 0.80 - --model-loader-extra-config '{"enable_multithread_load": true}' + --page-size 32 + --kv-cache-dtype auto + --chunked-prefill-size 16384 --watchdog-timeout 1200 - --page-size 16 - --kv-cache-dtype fp8_e4m3 - --cuda-graph-max-bs "$CUDA_GRAPH_MAX_BS" + --mem-fraction-static 0.9 + --model-loader-extra-config '{"enable_multithread_load": true}' --max-running-requests "$MAX_RUNNING_REQUESTS" - --max-prefill-tokens 32768 - --chunked-prefill-size 32768 - --scheduler-recv-interval "$SCHEDULER_RECV_INTERVAL" + --cuda-graph-max-bs "$CUDA_GRAPH_MAX_BS" --stream-interval 50 + --scheduler-recv-interval "$SCHEDULER_RECV_INTERVAL" "${TOKENIZER_ARGS[@]}" --tokenizer-path "$MODEL" - --reasoning-parser qwen3 - --tool-call-parser qwen3_coder --enable-metrics --enable-cache-report "${CACHE_ARGS[@]}" diff --git a/configs/amd-master.yaml b/configs/amd-master.yaml index 88be008379..09b204c548 100644 --- a/configs/amd-master.yaml +++ b/configs/amd-master.yaml @@ -381,7 +381,8 @@ qwen3.5-fp4-mi355x-sglang-agentic-mtp: # Qwen3.8-Flash-Next FP8 AgentX on MI355X via SGLang, without speculative # decoding: the MI355X SGLang path for this model does not drive MTP yet, so # this arm runs the target model alone and carries no synthetic-acceptance pin. -# FP8 because there is no AMD FP4 checkpoint for this model yet. +# FP8 at TP8 per the cookbook's verified balanced single-node command; NVFP4 +# is greyed out for MI355X and there is no AMD FP4 checkpoint for this model. qwen3.8next-fp8-mi355x-sglang-agentic: image: lmsysorg/sglang-rocm:qwen38flashnext model: Qwen/Qwen3.8-Flash-Next-FP8 @@ -394,7 +395,7 @@ qwen3.8next-fp8-mi355x-sglang-agentic: agentic-coding: - dram-utilization: 0.8 search-space: - - { tp: 4, ep: 1, kv-offloading: none, conc-list: [1, 4, 8, 12, 16] } + - { tp: 8, ep: 1, kv-offloading: none, conc-list: [1, 4, 8, 12, 16] } qwen3.5-fp4-mi355x-sglang-disagg: image: lmsysorg/sglang-rocm:v0.5.12.post1-rocm720-mi35x-20260523 model: amd/Qwen3.5-397B-A17B-MXFP4 diff --git a/perf-changelog.yaml b/perf-changelog.yaml index b758397825..4d25f6daac 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -6497,5 +6497,6 @@ description: - "Add the day-zero Qwen3.8-Flash-Next FP8 AgentX recipe on MI355X with SGLang at TP4 and concurrency 1/4/8/12/16." - "Run without speculative decoding because the MI355X SGLang path for this model does not drive MTP yet, so this arm carries no synthetic-acceptance pin." - - "Serve the FP8 checkpoint because no AMD FP4 checkpoint exists for this model yet." + - "Serve the FP8 checkpoint because no AMD FP4 checkpoint exists for this model yet and NVFP4 is unavailable for MI355X." + - "Correct the serve flags to the SGLang cookbook's verified balanced single-node command for this model: TP8 rather than TP4, page size 32, automatic KV cache dtype, chunked prefill 16384, memory fraction 0.9, and multithreaded model loading." pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2754 From 156466582d8f8684949bbcb758f872d9b6739dd1 Mon Sep 17 00:00:00 2001 From: functionstackx <47992694+functionstackx@users.noreply.github.com> Date: Wed, 26 Aug 2026 23:58:46 -0400 Subject: [PATCH 4/7] Stop the repo bind mount from hiding the image's sglang MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The MI355X cells died at server launch with /opt/venv/bin/python3: No module named 'sglang' The qwen38flashnext ROCm image has no pip-installed sglang. It ships the sources under /workspace and puts them on PYTHONPATH: PYTHONPATH=/workspace/sglang-qwen-next/python:/workspace/aiter-pr4882 Reading the image layers confirms sglang/__init__.py exists only at workspace/sglang-qwen-next/python/sglang/, with the patched aiter alongside it. This launcher bind-mounts the repository at /workspace, which masks both trees, so the interpreter finds nothing to import. Mount the repository at /inferencex for images that keep packages under /workspace, and move RESULT_DIR with it, since benchmark-tmpl.yml hard-codes /workspace/results and that is the only /workspace path it sets. The host side of the mount does not change, so the workflow's artifact staging still finds everything under GITHUB_WORKSPACE. Every other image keeps the current /workspace mount untouched. MI355X 各单元在启动服务时失败:/opt/venv/bin/python3 报 No module named 'sglang'。qwen38flashnext ROCm 镜像并未通过 pip 安装 sglang,而是把源码放在 /workspace 下并写入 PYTHONPATH。查阅镜像层可确认 sglang/__init__.py 仅存在于 workspace/sglang-qwen-next/python/sglang/,打过补丁的 aiter 也在其旁。本 launcher 将仓库绑定挂载到 /workspace,恰好把这两棵目录树遮蔽,解释器因而无从导入。 对于把 python 包放在 /workspace 下的镜像,改为将仓库挂载到 /inferencex,并同步 调整 RESULT_DIR(benchmark-tmpl.yml 硬编码了 /workspace/results,且这是它设置的 唯一 /workspace 路径)。挂载的宿主机一侧不变,工作流的产物收集仍能在 GITHUB_WORKSPACE 下找到全部文件。其他镜像的 /workspace 挂载保持原样。 Co-Authored-By: Claude Opus 5 (1M context) --- perf-changelog.yaml | 1 + runners/launch_mi355x-amds.sh | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/perf-changelog.yaml b/perf-changelog.yaml index 4d25f6daac..bd258d14a3 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -6499,4 +6499,5 @@ - "Run without speculative decoding because the MI355X SGLang path for this model does not drive MTP yet, so this arm carries no synthetic-acceptance pin." - "Serve the FP8 checkpoint because no AMD FP4 checkpoint exists for this model yet and NVFP4 is unavailable for MI355X." - "Correct the serve flags to the SGLang cookbook's verified balanced single-node command for this model: TP8 rather than TP4, page size 32, automatic KV cache dtype, chunked prefill 16384, memory fraction 0.9, and multithreaded model loading." + - "Mount the repository away from the container path this image keeps its python packages under, so the bind mount stops hiding the SGLang and aiter trees the image puts on PYTHONPATH." pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2754 diff --git a/runners/launch_mi355x-amds.sh b/runners/launch_mi355x-amds.sh index 49c3af0cf5..ae9bbdf3e4 100644 --- a/runners/launch_mi355x-amds.sh +++ b/runners/launch_mi355x-amds.sh @@ -313,12 +313,27 @@ else BENCHMARK_SCRIPT="$SCRIPT_FALLBACK" fi + # Some bring-up images ship their python packages under /workspace and put + # them on PYTHONPATH, e.g. the qwen38flashnext ROCm image sets + # PYTHONPATH=/workspace/sglang-qwen-next/python:/workspace/aiter-pr4882 + # and has no pip-installed sglang at all. Bind mounting the repo over + # /workspace masks those trees, and the server dies with + # "No module named 'sglang'". Mount the repo elsewhere for such images and + # move RESULT_DIR with it; the host side of the mount is unchanged, so the + # workflow's artifact staging still finds everything under GITHUB_WORKSPACE. + WS_MOUNT_DIR="/workspace" + if [[ "$IMAGE" == *qwen38flashnext* ]]; then + WS_MOUNT_DIR="/inferencex" + export RESULT_DIR="${RESULT_DIR/#\/workspace//inferencex}" + echo "Image ships packages under /workspace; mounting the repo at $WS_MOUNT_DIR (RESULT_DIR=$RESULT_DIR)" + fi + srun --jobid=$JOB_ID \ --container-image=$SQUASH_FILE \ - --container-mounts=$GITHUB_WORKSPACE:/workspace/,$HF_HUB_CACHE_MOUNT:$HF_HUB_CACHE,$AIPERF_MMAP_CACHE_HOST_PATH:/aiperf_mmap_cache \ + --container-mounts=$GITHUB_WORKSPACE:$WS_MOUNT_DIR/,$HF_HUB_CACHE_MOUNT:$HF_HUB_CACHE,$AIPERF_MMAP_CACHE_HOST_PATH:/aiperf_mmap_cache \ $SLRUM_HOME_MOUNT \ --container-writable \ - --container-workdir=/workspace/ \ + --container-workdir=$WS_MOUNT_DIR/ \ --container-remap-root \ --no-container-entrypoint --export=ALL,AIPERF_DATASET_MMAP_CACHE_DIR=/aiperf_mmap_cache \ bash "$BENCHMARK_SCRIPT" From 8643bdb192c1548a47e678cd0e1bdd5f159c37ca Mon Sep 17 00:00:00 2001 From: functionstackx <47992694+functionstackx@users.noreply.github.com> Date: Thu, 27 Aug 2026 00:21:18 -0400 Subject: [PATCH 5/7] Point the shared library's workspace variable at the moved mount MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Moving the repo mount to /inferencex fixed the masked sglang, and then install_agentic_deps failed: error: File not found: `/workspace/utils/agentic-benchmark/requirements.txt` benchmark_lib.sh resolves AGENTIC_DIR, AIPERF_DIR and every `cd` into the repo through INFMAX_CONTAINER_WORKSPACE, which defaults to /workspace. That variable already exists as the override knob, so export it alongside RESULT_DIR instead of touching the shared library. I checked benchmark-tmpl.yml for hard-coded /workspace paths before the first attempt but not benchmark_lib.sh. 把仓库挂载点移到 /inferencex 解决了 sglang 被遮蔽的问题,随后 install_agentic_deps 报错找不到 /workspace/utils/agentic-benchmark/ requirements.txt。benchmark_lib.sh 通过 INFMAX_CONTAINER_WORKSPACE 解析 AGENTIC_DIR、AIPERF_DIR 以及所有进入仓库的 cd,其默认值为 /workspace。该变量本就 是预留的覆盖入口,因此与 RESULT_DIR 一并导出,无需改动公共库。上次只检查了 benchmark-tmpl.yml 中硬编码的 /workspace,遗漏了 benchmark_lib.sh。 Co-Authored-By: Claude Opus 5 (1M context) --- perf-changelog.yaml | 2 +- runners/launch_mi355x-amds.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/perf-changelog.yaml b/perf-changelog.yaml index bd258d14a3..d7e97eb6ef 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -6499,5 +6499,5 @@ - "Run without speculative decoding because the MI355X SGLang path for this model does not drive MTP yet, so this arm carries no synthetic-acceptance pin." - "Serve the FP8 checkpoint because no AMD FP4 checkpoint exists for this model yet and NVFP4 is unavailable for MI355X." - "Correct the serve flags to the SGLang cookbook's verified balanced single-node command for this model: TP8 rather than TP4, page size 32, automatic KV cache dtype, chunked prefill 16384, memory fraction 0.9, and multithreaded model loading." - - "Mount the repository away from the container path this image keeps its python packages under, so the bind mount stops hiding the SGLang and aiter trees the image puts on PYTHONPATH." + - "Mount the repository away from the container path this image keeps its python packages under, so the bind mount stops hiding the SGLang and aiter trees the image puts on PYTHONPATH, and point the shared library's workspace variable at the new mount." pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2754 diff --git a/runners/launch_mi355x-amds.sh b/runners/launch_mi355x-amds.sh index ae9bbdf3e4..1b92ff1f2f 100644 --- a/runners/launch_mi355x-amds.sh +++ b/runners/launch_mi355x-amds.sh @@ -325,6 +325,11 @@ else if [[ "$IMAGE" == *qwen38flashnext* ]]; then WS_MOUNT_DIR="/inferencex" export RESULT_DIR="${RESULT_DIR/#\/workspace//inferencex}" + # benchmark_lib.sh resolves AGENTIC_DIR, AIPERF_DIR and every `cd` into + # the repo through this variable, which defaults to /workspace. Move it + # with the mount or install_agentic_deps looks for the requirements + # file at /workspace/utils/... inside the image and fails. + export INFMAX_CONTAINER_WORKSPACE="$WS_MOUNT_DIR" echo "Image ships packages under /workspace; mounting the repo at $WS_MOUNT_DIR (RESULT_DIR=$RESULT_DIR)" fi From e3f9890a248026c62866576ea093073eff8a71b0 Mon Sep 17 00:00:00 2001 From: functionstackx <47992694+functionstackx@users.noreply.github.com> Date: Thu, 27 Aug 2026 00:39:54 -0400 Subject: [PATCH 6/7] Serve the BF16 checkpoint: FP8 does not load on this ROCm image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MI355X now gets through dependency install and model loading, and dies in the weight loader: AssertionError: Expected 1.0, got 0.00019931793212890625 in skipped model.layers.1.ple.ple_embedding.ngram_embedding.weight_scale qwen4_exp.py:2039 in load_weights The image's model code classifies the PLE ngram embedding as an unquantized module and asserts its weight_scale is 1.0, but the FP8 checkpoint genuinely quantizes it and ships a real scale. Its modules_to_not_convert lists ple.conv1d, ple.key_proj and ple.value_proj and not the ngram embedding, so the skip set is being matched too broadly on the .ple. prefix. That is a bug in this image, no serve flag reaches it, and the tag has not been rebuilt since 2026-08-26. The CUDA image carries a different SGLang build and loads the same checkpoint fine, which is why only the AMD arm hits this. Switch to Qwen/Qwen3.8-Flash-Next, 335.3 GiB with no quantization_config, so there are no scales to mis-handle. TP8 puts that at ~42 GiB per rank of 288 GB. The config key and script are renamed to bf16 accordingly. Revert to FP8 once a fixed ROCm image ships. Also fixes the file header, which still described the Qwen3.5 MXFP4 EAGLE MTP recipe this was derived from: the generator applied that substitution without asserting it matched, so the wrong description shipped from the first commit. MI355X 现已通过依赖安装并进入权重加载,随后在加载器中失败:镜像中的模型代码把 PLE ngram embedding 归类为未量化模块并断言其 weight_scale 为 1.0,而 FP8 权重确实对其 做了量化并带有真实 scale。该权重的 modules_to_not_convert 列出了 ple.conv1d、 ple.key_proj 与 ple.value_proj,并不包含 ngram embedding,说明跳过集合按 .ple. 前缀做了过宽匹配。这是镜像自身的缺陷,任何服务参数都无法绕开,且该标签自 2026-08-26 起未再重建;CUDA 镜像使用的是另一套 SGLang 构建,加载同一权重正常, 因此只有 AMD 分支受影响。 改用 Qwen/Qwen3.8-Flash-Next(335.3 GiB,完全没有 quantization_config),不存在 可被误处理的 scale;TP8 下每卡约 42 GiB(共 288 GB)。配置项与脚本名相应改为 bf16。待修复版 ROCm 镜像发布后再切回 FP8。 同时修正文件头:此前仍在描述其所派生的 Qwen3.5 MXFP4 EAGLE MTP 配方——生成脚本 执行该替换时未做断言,导致错误描述从首次提交起一直存在。 Co-Authored-By: Claude Opus 5 (1M context) --- ...g.sh => qwen3.8next_bf16_mi355x_sglang.sh} | 28 +++++++++++++++++-- configs/amd-master.yaml | 12 ++++---- perf-changelog.yaml | 6 ++-- 3 files changed, 35 insertions(+), 11 deletions(-) rename benchmarks/single_node/agentic/{qwen3.8next_fp8_mi355x_sglang.sh => qwen3.8next_bf16_mi355x_sglang.sh} (72%) diff --git a/benchmarks/single_node/agentic/qwen3.8next_fp8_mi355x_sglang.sh b/benchmarks/single_node/agentic/qwen3.8next_bf16_mi355x_sglang.sh similarity index 72% rename from benchmarks/single_node/agentic/qwen3.8next_fp8_mi355x_sglang.sh rename to benchmarks/single_node/agentic/qwen3.8next_bf16_mi355x_sglang.sh index f066e8de38..6c5a99271e 100755 --- a/benchmarks/single_node/agentic/qwen3.8next_fp8_mi355x_sglang.sh +++ b/benchmarks/single_node/agentic/qwen3.8next_bf16_mi355x_sglang.sh @@ -2,9 +2,31 @@ set -euo pipefail set -x -# AgentX trace replay for Qwen3.5-397B-A17B MXFP4 on MI355X with SGLang -# native EAGLE MTP. Throughput uses the committed golden synthetic -# acceptance length; evaluation retains real target-model verification. +# AgentX trace replay for Qwen3.8-Flash-Next BF16 on MI355X with SGLang. +# Day-zero recipe; SGLang is the plan-of-record engine for this model +# (MODELS.md). +# +# Two deliberate differences from the NVIDIA arms: +# +# * No speculative decoding. The MI355X SGLang path for this model does not +# drive MTP yet, so this arm runs the target model alone and carries no +# synthetic-acceptance pin. Add MTP and the golden AL once ROCm supports +# it. Until then this arm is not directly comparable to the spec-decode +# NVIDIA arms on the published frontier. +# +# * BF16, not FP8 or FP4. NVFP4 is greyed out for MI355X in the cookbook and +# there is no AMD FP4 checkpoint. FP8 does not load either: this image's +# model code classifies model.layers.N.ple.ple_embedding.ngram_embedding +# as an unquantized module and asserts its weight_scale is 1.0, while the +# FP8 checkpoint genuinely quantizes it and ships a real scale: +# AssertionError: Expected 1.0, got 0.00019931793212890625 in skipped +# model.layers.1.ple.ple_embedding.ngram_embedding.weight_scale +# qwen4_exp.py:2039 in load_weights +# The checkpoint's modules_to_not_convert lists ple.conv1d, ple.key_proj +# and ple.value_proj but not the ngram embedding, so the skip set is being +# matched too broadly on the .ple. prefix. No serve flag changes that. The +# BF16 checkpoint (335.3 GiB, no quantization_config at all) has no scales +# to mis-handle. Revert to FP8 once a fixed ROCm image ships. source "$(dirname "$0")/../../benchmark_lib.sh" diff --git a/configs/amd-master.yaml b/configs/amd-master.yaml index 09b204c548..198d6cccfc 100644 --- a/configs/amd-master.yaml +++ b/configs/amd-master.yaml @@ -381,14 +381,16 @@ qwen3.5-fp4-mi355x-sglang-agentic-mtp: # Qwen3.8-Flash-Next FP8 AgentX on MI355X via SGLang, without speculative # decoding: the MI355X SGLang path for this model does not drive MTP yet, so # this arm runs the target model alone and carries no synthetic-acceptance pin. -# FP8 at TP8 per the cookbook's verified balanced single-node command; NVFP4 -# is greyed out for MI355X and there is no AMD FP4 checkpoint for this model. -qwen3.8next-fp8-mi355x-sglang-agentic: +# BF16 at TP8. NVFP4 is greyed out for MI355X and there is no AMD FP4 +# checkpoint; FP8 does not load on this image either, because its model code +# asserts a 1.0 weight_scale on the PLE ngram embedding that the FP8 checkpoint +# genuinely quantizes. BF16 has no scales at all. Revert to FP8 once fixed. +qwen3.8next-bf16-mi355x-sglang-agentic: image: lmsysorg/sglang-rocm:qwen38flashnext - model: Qwen/Qwen3.8-Flash-Next-FP8 + model: Qwen/Qwen3.8-Flash-Next model-prefix: qwen3.8next runner: cluster:mi355x-amds - precision: fp8 + precision: bf16 framework: sglang multinode: false scenarios: diff --git a/perf-changelog.yaml b/perf-changelog.yaml index d7e97eb6ef..5fbaae82ff 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -6491,13 +6491,13 @@ - "Route only enabled recipes through the immutable producer fork and preserve non-power launcher revisions." pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2688 - config-keys: - - qwen3.8next-fp8-mi355x-sglang-agentic + - qwen3.8next-bf16-mi355x-sglang-agentic scenario-type: - agentic-coding description: - - "Add the day-zero Qwen3.8-Flash-Next FP8 AgentX recipe on MI355X with SGLang at TP4 and concurrency 1/4/8/12/16." + - "Add the day-zero Qwen3.8-Flash-Next BF16 AgentX recipe on MI355X with SGLang at TP8 and concurrency 1/4/8/12/16." - "Run without speculative decoding because the MI355X SGLang path for this model does not drive MTP yet, so this arm carries no synthetic-acceptance pin." - - "Serve the FP8 checkpoint because no AMD FP4 checkpoint exists for this model yet and NVFP4 is unavailable for MI355X." + - "Serve the BF16 checkpoint: NVFP4 is unavailable for MI355X, no AMD FP4 checkpoint exists, and the FP8 checkpoint does not load on this image because its model code asserts a 1.0 weight scale on a PLE embedding the checkpoint genuinely quantizes." - "Correct the serve flags to the SGLang cookbook's verified balanced single-node command for this model: TP8 rather than TP4, page size 32, automatic KV cache dtype, chunked prefill 16384, memory fraction 0.9, and multithreaded model loading." - "Mount the repository away from the container path this image keeps its python packages under, so the bind mount stops hiding the SGLang and aiter trees the image puts on PYTHONPATH, and point the shared library's workspace variable at the new mount." pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2754 From 4b02f48a1e9f73abe7153ebf4f3f7ddbb6b72be3 Mon Sep 17 00:00:00 2001 From: functionstackx <47992694+functionstackx@users.noreply.github.com> Date: Thu, 27 Aug 2026 00:45:08 -0400 Subject: [PATCH 7/7] Restore FP8 on MI355X and document the upstream blocker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reverting the BF16 switch: this arm stays FP8 on Qwen/Qwen3.8-Flash-Next-FP8, per instruction. The key, model and script name go back to fp8; the corrected file header is kept and rewritten to describe the FP8 arm. It will keep failing on the current image, and it is worth writing down why so nobody spends the debugging round again. The server aborts in load_weights: AssertionError: Expected 1.0, got 0.00019931793212890625 in skipped model.layers.1.ple.ple_embedding.ngram_embedding.weight_scale The model registers no parameter for the PLE ngram embedding, so the loader takes its "skipped" branch, which assumes any orphaned _scale is a no-op and asserts it is 1.0. Reading the checkpoint directly: that embedding is stored as 128 shard_N.weight tensors of dtype F8_E4M3 with one BF16 weight_scale of ~1.99e-4, and modules_to_not_convert lists ple.conv1d, ple.key_proj and ple.value_proj but not the ngram embedding. So the tensor really is quantized and the model simply cannot consume it yet. Suppressing the assert would not fix it: the shards would load as raw FP8 with the scale never applied, leaving that embedding wrong by roughly 5000x and no error reported. That is silent corruption, so it is deliberately not done. The CUDA image carries a different SGLang build and loads the same checkpoint, so this is specific to the ROCm build, and the tag has not been rebuilt since 2026-08-26. The recipe is otherwise the cookbook's verified balanced command and needs no further change once a fixed image ships. 按指示回退 BF16 改动:本分支恢复为 FP8,使用 Qwen/Qwen3.8-Flash-Next-FP8;配置项、 权重与脚本名均改回 fp8,同时保留并改写了修正后的文件头以描述 FP8 分支。 在当前镜像上它仍会失败,原因值得写清楚,以免重复排查。服务在 load_weights 阶段 中止:模型未为 PLE ngram embedding 注册参数,加载器因而走「skipped」分支,该分支 假定任何无对应参数的 _scale 都是空操作并断言其为 1.0。直接读取权重可见:该 embedding 由 128 个 dtype 为 F8_E4M3 的 shard_N.weight 与一个 ~1.99e-4 的 BF16 weight_scale 组成,而 modules_to_not_convert 只列出 ple.conv1d、ple.key_proj 与 ple.value_proj,并不含 ngram embedding。也就是说该张量确实被量化,只是模型尚无法 使用它。 屏蔽该断言并不能解决问题:这样会以原始 FP8 加载分片而从不施加 scale,使该 embedding 偏差约 5000 倍且不报任何错误。这属于静默的数值破坏,因此刻意不做。CUDA 镜像使用另一套 SGLang 构建,可正常加载同一权重,故该问题仅限 ROCm 构建,且该标签 自 2026-08-26 起未重建。除此之外本配方就是 cookbook 的验证命令,待修复镜像发布后 无需再改。 Co-Authored-By: Claude Opus 5 (1M context) --- ...ng.sh => qwen3.8next_fp8_mi355x_sglang.sh} | 37 ++++++++++++------- configs/amd-master.yaml | 15 ++++---- perf-changelog.yaml | 6 +-- 3 files changed, 34 insertions(+), 24 deletions(-) rename benchmarks/single_node/agentic/{qwen3.8next_bf16_mi355x_sglang.sh => qwen3.8next_fp8_mi355x_sglang.sh} (75%) diff --git a/benchmarks/single_node/agentic/qwen3.8next_bf16_mi355x_sglang.sh b/benchmarks/single_node/agentic/qwen3.8next_fp8_mi355x_sglang.sh similarity index 75% rename from benchmarks/single_node/agentic/qwen3.8next_bf16_mi355x_sglang.sh rename to benchmarks/single_node/agentic/qwen3.8next_fp8_mi355x_sglang.sh index 6c5a99271e..6954bc6006 100755 --- a/benchmarks/single_node/agentic/qwen3.8next_bf16_mi355x_sglang.sh +++ b/benchmarks/single_node/agentic/qwen3.8next_fp8_mi355x_sglang.sh @@ -2,7 +2,7 @@ set -euo pipefail set -x -# AgentX trace replay for Qwen3.8-Flash-Next BF16 on MI355X with SGLang. +# AgentX trace replay for Qwen3.8-Flash-Next FP8 on MI355X with SGLang. # Day-zero recipe; SGLang is the plan-of-record engine for this model # (MODELS.md). # @@ -14,19 +14,28 @@ set -x # it. Until then this arm is not directly comparable to the spec-decode # NVIDIA arms on the published frontier. # -# * BF16, not FP8 or FP4. NVFP4 is greyed out for MI355X in the cookbook and -# there is no AMD FP4 checkpoint. FP8 does not load either: this image's -# model code classifies model.layers.N.ple.ple_embedding.ngram_embedding -# as an unquantized module and asserts its weight_scale is 1.0, while the -# FP8 checkpoint genuinely quantizes it and ships a real scale: -# AssertionError: Expected 1.0, got 0.00019931793212890625 in skipped -# model.layers.1.ple.ple_embedding.ngram_embedding.weight_scale -# qwen4_exp.py:2039 in load_weights -# The checkpoint's modules_to_not_convert lists ple.conv1d, ple.key_proj -# and ple.value_proj but not the ngram embedding, so the skip set is being -# matched too broadly on the .ple. prefix. No serve flag changes that. The -# BF16 checkpoint (335.3 GiB, no quantization_config at all) has no scales -# to mis-handle. Revert to FP8 once a fixed ROCm image ships. +# * FP8, not FP4. NVFP4 is greyed out for MI355X in the SGLang cookbook and +# there is no AMD FP4 checkpoint for this model. +# +# KNOWN BLOCKER, upstream, not in this recipe: on the current +# lmsysorg/sglang-rocm:qwen38flashnext image the server aborts while loading +# weights with +# AssertionError: Expected 1.0, got 0.00019931793212890625 in skipped +# model.layers.1.ple.ple_embedding.ngram_embedding.weight_scale +# qwen4_exp.py:2039 in load_weights +# The model registers no parameter for the PLE ngram embedding, so load_weights +# takes the "skipped" branch, which assumes any orphaned _scale must be a no-op +# and asserts it is 1.0. The checkpoint really does quantize that embedding: +# its 128 shard_N.weight tensors are F8_E4M3 with a single BF16 weight_scale of +# ~1.99e-4, and modules_to_not_convert lists ple.conv1d, ple.key_proj and +# ple.value_proj but not the ngram embedding. +# +# Suppressing the assert is NOT a fix: the shards would load as raw FP8 with +# the scale never applied, leaving that embedding wrong by ~5000x with no error +# reported. The CUDA image carries a different SGLang build and loads the same +# checkpoint, so this is specific to the ROCm build. It clears when that image +# implements the quantized PLE ngram embedding; the recipe below is otherwise +# the cookbook's verified balanced command and needs no further change. source "$(dirname "$0")/../../benchmark_lib.sh" diff --git a/configs/amd-master.yaml b/configs/amd-master.yaml index 198d6cccfc..285d7e5c46 100644 --- a/configs/amd-master.yaml +++ b/configs/amd-master.yaml @@ -381,16 +381,17 @@ qwen3.5-fp4-mi355x-sglang-agentic-mtp: # Qwen3.8-Flash-Next FP8 AgentX on MI355X via SGLang, without speculative # decoding: the MI355X SGLang path for this model does not drive MTP yet, so # this arm runs the target model alone and carries no synthetic-acceptance pin. -# BF16 at TP8. NVFP4 is greyed out for MI355X and there is no AMD FP4 -# checkpoint; FP8 does not load on this image either, because its model code -# asserts a 1.0 weight_scale on the PLE ngram embedding that the FP8 checkpoint -# genuinely quantizes. BF16 has no scales at all. Revert to FP8 once fixed. -qwen3.8next-bf16-mi355x-sglang-agentic: +# FP8 at TP8 per the cookbook's verified balanced single-node command; NVFP4 +# is greyed out for MI355X and there is no AMD FP4 checkpoint for this model. +# Blocked upstream: the current ROCm image asserts a 1.0 weight_scale on the +# PLE ngram embedding that this checkpoint genuinely quantizes to F8_E4M3. +# See the script header; suppressing the assert would corrupt the embedding. +qwen3.8next-fp8-mi355x-sglang-agentic: image: lmsysorg/sglang-rocm:qwen38flashnext - model: Qwen/Qwen3.8-Flash-Next + model: Qwen/Qwen3.8-Flash-Next-FP8 model-prefix: qwen3.8next runner: cluster:mi355x-amds - precision: bf16 + precision: fp8 framework: sglang multinode: false scenarios: diff --git a/perf-changelog.yaml b/perf-changelog.yaml index 5fbaae82ff..602722d541 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -6491,13 +6491,13 @@ - "Route only enabled recipes through the immutable producer fork and preserve non-power launcher revisions." pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2688 - config-keys: - - qwen3.8next-bf16-mi355x-sglang-agentic + - qwen3.8next-fp8-mi355x-sglang-agentic scenario-type: - agentic-coding description: - - "Add the day-zero Qwen3.8-Flash-Next BF16 AgentX recipe on MI355X with SGLang at TP8 and concurrency 1/4/8/12/16." + - "Add the day-zero Qwen3.8-Flash-Next FP8 AgentX recipe on MI355X with SGLang at TP8 and concurrency 1/4/8/12/16." - "Run without speculative decoding because the MI355X SGLang path for this model does not drive MTP yet, so this arm carries no synthetic-acceptance pin." - - "Serve the BF16 checkpoint: NVFP4 is unavailable for MI355X, no AMD FP4 checkpoint exists, and the FP8 checkpoint does not load on this image because its model code asserts a 1.0 weight scale on a PLE embedding the checkpoint genuinely quantizes." + - "Serve the FP8 checkpoint because no AMD FP4 checkpoint exists for this model yet and NVFP4 is unavailable for MI355X." - "Correct the serve flags to the SGLang cookbook's verified balanced single-node command for this model: TP8 rather than TP4, page size 32, automatic KV cache dtype, chunked prefill 16384, memory fraction 0.9, and multithreaded model loading." - "Mount the repository away from the container path this image keeps its python packages under, so the bind mount stops hiding the SGLang and aiter trees the image puts on PYTHONPATH, and point the shared library's workspace variable at the new mount." pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2754