From 809d68013adbf9ce06b7a692ba4098ad71dc5db9 Mon Sep 17 00:00:00 2001 From: functionstackx <47992694+functionstackx@users.noreply.github.com> Date: Wed, 26 Aug 2026 23:07:12 -0400 Subject: [PATCH 1/6] qwen3.8next-fp4-b300-sglang-agentic-mtp: day-zero Qwen3.8-Flash-Next AgentX on B300 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add the Qwen3.8-Flash-Next AgentX recipe on B300, served by SGLang with native NEXTN MTP. Mirrors the B200 arm: RadixArk/Qwen3.8-Flash-Next-NVFP4 at TP4 with modelopt_fp4 quantization, following the Qwen3.5 NVFP4 B300 sibling. Throughput runs pin an interim acceptance length of 3.24 at three speculative tokens; eval-only runs keep real target verification. 新增 B300 上的 Qwen3.8-Flash-Next AgentX 配方,由 SGLang 以原生 NEXTN MTP 提供 服务。与 B200 分支一致:使用 RadixArk/Qwen3.8-Flash-Next-NVFP4,TP4, modelopt_fp4 量化,参照 Qwen3.5 NVFP4 B300 同类配方。吞吐运行按 3 个投机 token 锁定临时接受长度 3.24,仅评测运行仍使用真实目标验证。 Co-Authored-By: Claude Opus 5 (1M context) --- .../qwen3.8next_fp4_b300_sglang_mtp.sh | 192 ++++++++++++++++++ configs/nvidia-master.yaml | 17 ++ perf-changelog.yaml | 9 + 3 files changed, 218 insertions(+) create mode 100755 benchmarks/single_node/agentic/qwen3.8next_fp4_b300_sglang_mtp.sh diff --git a/benchmarks/single_node/agentic/qwen3.8next_fp4_b300_sglang_mtp.sh b/benchmarks/single_node/agentic/qwen3.8next_fp4_b300_sglang_mtp.sh new file mode 100755 index 0000000000..1739e81fb5 --- /dev/null +++ b/benchmarks/single_node/agentic/qwen3.8next_fp4_b300_sglang_mtp.sh @@ -0,0 +1,192 @@ +#!/usr/bin/env bash +set -euo pipefail +set -x + +# AgentX trace replay for Qwen3.8-Flash-Next NVFP4 on B300 with SGLang +# native NEXTN MTP. Day-zero recipe; SGLang is the plan-of-record engine for +# this model (MODELS.md). Throughput uses the golden synthetic AL; evals retain +# real target-model verification. +# +# The checkpoint is RadixArk/Qwen3.8-Flash-Next-NVFP4 (126 GiB, +# quantization_config.quant_method = modelopt), so --quantization modelopt_fp4 +# matches the same flag the Qwen3.5 NVFP4 sibling uses. The model ships native +# MTP modules (kept unquantized by the checkpoint's ignore list), so NEXTN +# needs no external drafter. + +source "$(dirname "$0")/../../benchmark_lib.sh" + +# Use the lightweight GSM8K eval instead of the AgentX SWE-bench default. +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:-10} + +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 +nvidia-smi + +export WEKA_LOADER_OVERRIDE=semianalysis_cc_traces_weka_062126_256k +resolve_trace_source +install_agentic_deps + +SERVER_LOG="$RESULT_DIR/server.log" +mkdir -p "$RESULT_DIR" + +CACHE_ARGS=() +if require_agentic_kv_offload_backend hicache; then + REQUESTED_HICACHE_TOTAL_GB="${HICACHE_TOTAL_CPU_DRAM_GB:-$TOTAL_CPU_DRAM_GB}" + if [ "$REQUESTED_HICACHE_TOTAL_GB" -gt "$TOTAL_CPU_DRAM_GB" ]; then + echo "Error: requested HiCache pool ${REQUESTED_HICACHE_TOTAL_GB} GB exceeds configured capacity ${TOTAL_CPU_DRAM_GB} GB" >&2 + exit 1 + fi + TOTAL_CPU_DRAM_GB="$REQUESTED_HICACHE_TOTAL_GB" + # SGLang applies --hicache-size independently to Qwen's target KV and + # Mamba pools. Native NEXTN also creates a draft KV pool with the same + # slot count; its one attention layer adds 1/15 of the target KV bytes. + # Reserve 1 GB/rank for page alignment and enforce H * 31/15 per rank. + HICACHE_ALIGNMENT_RESERVE_GB=$TP + HICACHE_USABLE_TOTAL_GB=$((TOTAL_CPU_DRAM_GB - HICACHE_ALIGNMENT_RESERVE_GB)) + if [ "$HICACHE_USABLE_TOTAL_GB" -lt 1 ]; then + echo "Error: insufficient DRAM after HiCache alignment reserve" >&2 + exit 1 + fi + MAX_HICACHE_SIZE_GB=$((HICACHE_USABLE_TOTAL_GB * 15 / TP / 31)) + HICACHE_SIZE_GB="${HICACHE_SIZE_GB:-$MAX_HICACHE_SIZE_GB}" + if [ "$HICACHE_SIZE_GB" -lt 1 ] || [ "$HICACHE_SIZE_GB" -gt "$MAX_HICACHE_SIZE_GB" ]; then + echo "Error: HICACHE_SIZE_GB=$HICACHE_SIZE_GB outside 1..$MAX_HICACHE_SIZE_GB" >&2 + exit 1 + fi + PROJECTED_HICACHE_TOTAL_GB=$(((HICACHE_SIZE_GB * TP * 31 + 14) / 15 + HICACHE_ALIGNMENT_RESERVE_GB)) + if [ "$PROJECTED_HICACHE_TOTAL_GB" -gt "$TOTAL_CPU_DRAM_GB" ]; then + echo "Error: projected HiCache use ${PROJECTED_HICACHE_TOTAL_GB} GB exceeds configured capacity ${TOTAL_CPU_DRAM_GB} GB" >&2 + exit 1 + fi + echo "HiCache CPU pools: ${HICACHE_SIZE_GB} GB target + Mamba + 1/15 draft per rank across TP=${TP}; projected node total ${PROJECTED_HICACHE_TOTAL_GB} GB <= ${TOTAL_CPU_DRAM_GB} GB" + CACHE_ARGS=( + --page-size 64 + --enable-hierarchical-cache + --hicache-size "$HICACHE_SIZE_GB" + --hicache-io-backend kernel + --hicache-mem-layout page_first + --hicache-write-policy write_through_selective + ) +fi + +PARALLEL_ARGS=( + --tp "$TP" + --dp 1 + --ep-size "$EP_SIZE" +) + +# TP4 needs parallel tokenization to keep 256k AgentX warmups below the client +# request timeout. Keep TP2 on SGLang's single-worker default: multi-tokenizer +# startup races with the TP2 HiCache shared-memory initialization path. +TOKENIZER_ARGS=() +if [ "$TP" -ge 4 ]; then + TOKENIZER_ARGS=(--tokenizer-worker-num 6) +fi + +# AgentX concurrency counts live session trees rather than individual HTTP +# requests. Leave room for subagent fan-out and avoid spending HBM on graphs +# above the batch sizes that remain useful for this long-context workload. +MAX_RUNNING_REQUESTS=$((2 * CONC)) +CUDA_GRAPH_MAX_BS="$CONC" +[ "$CUDA_GRAPH_MAX_BS" -gt 64 ] && CUDA_GRAPH_MAX_BS=64 + +export TORCH_CUDA_ARCH_LIST="10.0" +export PYTHONNOUSERSITE=1 +export NCCL_NVLS_ENABLE=1 +export SGL_ENABLE_JIT_DEEPGEMM=false +export SGLANG_ENABLE_FLASHINFER_GEMM=true +# Keep server-side connections alive beyond AIPerf's 300-second client pool +# timeout so bursty AgentX trajectories cannot reuse a closing idle socket. +export SGLANG_TIMEOUT_KEEP_ALIVE=1800 + +if [ "${EVAL_ONLY:-false}" != "true" ]; then + # Qwen3.8-Flash-Next acceptance length, SPEED-Bench coding. + # --speculative-num-steps 3 with 4 draft tokens is 3 speculative + # tokens per verification step, i.e. the MTP=3 cell -> AL 3.24. + # Measured thinking=off in speedbench-al run 33031708148; the + # thinking=on collection is still in flight, so this is an + # interim value and is not yet a committed golden_al_distribution + # curve. Refresh once qwen3.8next_mtp.yaml lands. + export SGLANG_SIMULATE_ACC_LEN=3.24 + 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[@]}" + --enable-symm-mem + --quantization modelopt_fp4 + --fp4-gemm-backend flashinfer_cutlass + --kv-cache-dtype fp8_e4m3 + --mamba-ssm-dtype bfloat16 + --attention-backend trtllm_mha + --moe-runner-backend flashinfer_trtllm + --cuda-graph-max-bs "$CUDA_GRAPH_MAX_BS" + --max-running-requests "$MAX_RUNNING_REQUESTS" + --max-prefill-tokens 16384 + --chunked-prefill-size 16384 + --mem-fraction-static 0.80 + --stream-interval 50 + --scheduler-recv-interval "$SCHEDULER_RECV_INTERVAL" + "${TOKENIZER_ARGS[@]}" + --tokenizer-path "$MODEL" + --reasoning-parser qwen3 + --tool-call-parser qwen3_coder + --speculative-algorithm NEXTN + --speculative-num-steps 3 + --speculative-eagle-topk 1 + --speculative-num-draft-tokens 4 + --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=$! + +capture_cache_metrics() { + { + echo "=== SGLang cache metrics snapshot $(date --iso-8601=seconds) ===" + curl -fsS "http://localhost:$PORT/metrics" 2>/dev/null \ + | grep -E '^(sglang:(cache_hit_rate|cached_tokens_total|prompt_tokens_total|hicache_host_used_tokens|hicache_host_total_tokens|token_usage|num_requests_running|num_requests_waiting))' \ + || true + echo "============================================================" + } >> "$SERVER_LOG" +} + +wait_for_server_ready --port "$PORT" --server-log "$SERVER_LOG" --server-pid "$SERVER_PID" + +capture_cache_metrics +trap capture_cache_metrics EXIT + +if [ "${EVAL_ONLY:-false}" = "true" ]; then + run_eval --port "$PORT" +else + build_replay_cmd "$RESULT_DIR" + REPLAY_CMD+=" --server-metrics http://localhost:$PORT/metrics" + run_agentic_replay_and_write_outputs "$RESULT_DIR" +fi diff --git a/configs/nvidia-master.yaml b/configs/nvidia-master.yaml index 4c1036915d..099f5711bb 100644 --- a/configs/nvidia-master.yaml +++ b/configs/nvidia-master.yaml @@ -7031,6 +7031,23 @@ qwen3.5-fp4-b300-sglang-agentic-mtp: - { tp: 2, ep: 2, spec-decoding: mtp, kv-offloading: none, conc-list: [1, 4, 8, 12, 16, 20, 24, 28, 32] } - { tp: 2, ep: 2, spec-decoding: mtp, kv-offloading: dram, kv-offload-backend: { name: hicache }, conc-list: [36, 44, 52] } + +# Qwen3.8-Flash-Next NVFP4 AgentX on B300 via SGLang with native NEXTN MTP. +# Day-zero recipe; mirrors the B200 arm, with B300's larger HBM leaving more +# room per rank at the same TP4 layout. +qwen3.8next-fp4-b300-sglang-agentic-mtp: + image: lmsysorg/sglang:qwen38flashnext + model: RadixArk/Qwen3.8-Flash-Next-NVFP4 + model-prefix: qwen3.8next + runner: cluster:b300-nv + precision: fp4 + framework: sglang + multinode: false + scenarios: + agentic-coding: + - dram-utilization: 0.8 + search-space: + - { tp: 4, ep: 1, spec-decoding: mtp, kv-offloading: none, conc-list: [1, 4, 8, 12, 16] } # Controlled AgentX power A/B: identical software, topology, MTP settings, # concurrency, and memory tier across FP8 and FP4. The HBM-only rows measure # the natural AgentX prefix-cache workload; HiCache isolates host-tier effects. diff --git a/perf-changelog.yaml b/perf-changelog.yaml index de9533314a..695ae26583 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-fp4-b300-sglang-agentic-mtp + scenario-type: + - agentic-coding + description: + - "Add the day-zero Qwen3.8-Flash-Next NVFP4 AgentX recipe on B300 with SGLang native NEXTN MTP at TP4 and concurrency 1/4/8/12/16." + - "Serve RadixArk/Qwen3.8-Flash-Next-NVFP4 with modelopt_fp4 quantization, the trtllm_mha attention backend, and the flashinfer_trtllm MoE runner, following the Qwen3.5 NVFP4 B300 sibling." + - "Pin throughput runs to an interim acceptance length of 3.24 measured at three speculative tokens; eval-only runs keep real target verification." + pr-link: TBD From 1b931e5ddc13b5e084f36e512b8b8a3702221316 Mon Sep 17 00:00:00 2001 From: functionstackx <47992694+functionstackx@users.noreply.github.com> Date: Wed, 26 Aug 2026 23:07:34 -0400 Subject: [PATCH 2/6] =?UTF-8?q?Fill=20perf-changelog=20pr-link=20for=20#27?= =?UTF-8?q?52=20/=20=E8=A1=A5=E5=85=A8=20#2752=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 695ae26583..3f1bea2d3e 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -6498,4 +6498,4 @@ - "Add the day-zero Qwen3.8-Flash-Next NVFP4 AgentX recipe on B300 with SGLang native NEXTN MTP at TP4 and concurrency 1/4/8/12/16." - "Serve RadixArk/Qwen3.8-Flash-Next-NVFP4 with modelopt_fp4 quantization, the trtllm_mha attention backend, and the flashinfer_trtllm MoE runner, following the Qwen3.5 NVFP4 B300 sibling." - "Pin throughput runs to an interim acceptance length of 3.24 measured at three speculative tokens; eval-only runs keep real target verification." - pr-link: TBD + pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2752 From 5a369bc79bf8775895960eff21e5cef8734a9a2e Mon Sep 17 00:00:00 2001 From: functionstackx <47992694+functionstackx@users.noreply.github.com> Date: Wed, 26 Aug 2026 23:29:09 -0400 Subject: [PATCH 3/6] Use the cookbook's verified TP1 command and the committed golden AL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same correction as the B200 arm. The SGLang cookbook playground's verified single-node command for Qwen3.8-Flash-Next on B300 is --tp 1: 126 GiB of NVFP4 weights fit on one 288 GB part. It takes the hybrid GDN linear-attention backends rather than a single --attention-backend, reads quantization from the checkpoint, and drops the trtllm_mha / flashinfer_trtllm MoE flags inherited from the Qwen3.5 recipe. --max-running-requests stays explicit, since NEXTN silently resets it to 48 when unset. Acceptance length moves from the interim 3.24 to the committed golden thinking_on value of 2.32. 与 B200 分支相同的修正。SGLang cookbook playground 给出的 Qwen3.8-Flash-Next B300 单节点验证命令为 --tp 1:126 GiB 的 NVFP4 权重可放入单张 288 GB 卡。该命令 改用混合 GDN 线性注意力的独立后端,量化直接从权重读取,并去掉了沿袭自 Qwen3.5 配方的 trtllm_mha 与 flashinfer_trtllm MoE 参数。--max-running-requests 保持显式 设置,因为 NEXTN 在其未设置时会静默重置为 48。接受长度由临时值 3.24 改为已提交 黄金曲线的 thinking_on 取值 2.32。 Co-Authored-By: Claude Opus 5 (1M context) --- .../qwen3.8next_fp4_b300_sglang_mtp.sh | 47 ++++++++++--------- configs/nvidia-master.yaml | 6 +-- perf-changelog.yaml | 3 +- 3 files changed, 29 insertions(+), 27 deletions(-) diff --git a/benchmarks/single_node/agentic/qwen3.8next_fp4_b300_sglang_mtp.sh b/benchmarks/single_node/agentic/qwen3.8next_fp4_b300_sglang_mtp.sh index 1739e81fb5..435e9a9405 100755 --- a/benchmarks/single_node/agentic/qwen3.8next_fp4_b300_sglang_mtp.sh +++ b/benchmarks/single_node/agentic/qwen3.8next_fp4_b300_sglang_mtp.sh @@ -12,6 +12,10 @@ set -x # matches the same flag the Qwen3.5 NVFP4 sibling uses. The model ships native # MTP modules (kept unquantized by the checkpoint's ignore list), so NEXTN # needs no external drafter. +# +# TP1: the cookbook's verified single-node command for this model is --tp 1 on +# both Blackwell parts. 126 GiB of NVFP4 weights fit on one B300, so the +# model is not sharded and every rank-crossing collective disappears. source "$(dirname "$0")/../../benchmark_lib.sh" @@ -116,14 +120,12 @@ export SGLANG_ENABLE_FLASHINFER_GEMM=true export SGLANG_TIMEOUT_KEEP_ALIVE=1800 if [ "${EVAL_ONLY:-false}" != "true" ]; then - # Qwen3.8-Flash-Next acceptance length, SPEED-Bench coding. - # --speculative-num-steps 3 with 4 draft tokens is 3 speculative - # tokens per verification step, i.e. the MTP=3 cell -> AL 3.24. - # Measured thinking=off in speedbench-al run 33031708148; the - # thinking=on collection is still in flight, so this is an - # interim value and is not yet a committed golden_al_distribution - # curve. Refresh once qwen3.8next_mtp.yaml lands. - export SGLANG_SIMULATE_ACC_LEN=3.24 + # golden_al_distribution/qwen3.8next_mtp.yaml: + # qwen3.8-flash-next-fp8.thinking_on[3] = 2.32. + # --speculative-num-steps 3 with 4 draft tokens is 3 speculative tokens + # per verification step, i.e. the MTP=3 cell. AgentX replays run with + # thinking on, so the thinking_on row is the right one. + export SGLANG_SIMULATE_ACC_LEN=2.32 export SGLANG_SIMULATE_ACC_METHOD=match-expected export SGLANG_SIMULATE_ACC_TOKEN_MODE=real-draft-token fi @@ -136,28 +138,27 @@ SGLANG_CMD=( --port "$PORT" --trust-remote-code "${PARALLEL_ARGS[@]}" - --enable-symm-mem - --quantization modelopt_fp4 - --fp4-gemm-backend flashinfer_cutlass - --kv-cache-dtype fp8_e4m3 + # Verified flags from the SGLang cookbook playground for this model on + # B300 / NVFP4 / single node. Quantization is read from the + # checkpoint, so no --quantization flag; the hybrid GDN linear-attention + # layers take their own backends rather than --attention-backend. + --linear-attn-prefill-backend flashinfer + --linear-attn-decode-backend flashinfer --mamba-ssm-dtype bfloat16 - --attention-backend trtllm_mha - --moe-runner-backend flashinfer_trtllm - --cuda-graph-max-bs "$CUDA_GRAPH_MAX_BS" + --speculative-algorithm NEXTN + --speculative-num-steps 3 + --speculative-eagle-topk 1 + --speculative-num-draft-tokens 4 + --reasoning-parser auto + # NEXTN silently resets --max-running-requests to 48 when it is unset, so + # this must stay explicit and sized to the AgentX concurrency. --max-running-requests "$MAX_RUNNING_REQUESTS" - --max-prefill-tokens 16384 - --chunked-prefill-size 16384 + --cuda-graph-max-bs "$CUDA_GRAPH_MAX_BS" --mem-fraction-static 0.80 --stream-interval 50 --scheduler-recv-interval "$SCHEDULER_RECV_INTERVAL" "${TOKENIZER_ARGS[@]}" --tokenizer-path "$MODEL" - --reasoning-parser qwen3 - --tool-call-parser qwen3_coder - --speculative-algorithm NEXTN - --speculative-num-steps 3 - --speculative-eagle-topk 1 - --speculative-num-draft-tokens 4 --enable-metrics --enable-cache-report "${CACHE_ARGS[@]}" diff --git a/configs/nvidia-master.yaml b/configs/nvidia-master.yaml index 099f5711bb..6e692c094a 100644 --- a/configs/nvidia-master.yaml +++ b/configs/nvidia-master.yaml @@ -7033,8 +7033,8 @@ qwen3.5-fp4-b300-sglang-agentic-mtp: # Qwen3.8-Flash-Next NVFP4 AgentX on B300 via SGLang with native NEXTN MTP. -# Day-zero recipe; mirrors the B200 arm, with B300's larger HBM leaving more -# room per rank at the same TP4 layout. +# Day-zero recipe; mirrors the B200 arm. TP1 per the cookbook's verified +# single-node command: 126 GiB of NVFP4 weights fit on one B300. qwen3.8next-fp4-b300-sglang-agentic-mtp: image: lmsysorg/sglang:qwen38flashnext model: RadixArk/Qwen3.8-Flash-Next-NVFP4 @@ -7047,7 +7047,7 @@ qwen3.8next-fp4-b300-sglang-agentic-mtp: agentic-coding: - dram-utilization: 0.8 search-space: - - { tp: 4, ep: 1, spec-decoding: mtp, kv-offloading: none, conc-list: [1, 4, 8, 12, 16] } + - { tp: 1, ep: 1, spec-decoding: mtp, kv-offloading: none, conc-list: [1, 4, 8, 12, 16] } # Controlled AgentX power A/B: identical software, topology, MTP settings, # concurrency, and memory tier across FP8 and FP4. The HBM-only rows measure # the natural AgentX prefix-cache workload; HiCache isolates host-tier effects. diff --git a/perf-changelog.yaml b/perf-changelog.yaml index 3f1bea2d3e..89fa991b42 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -6497,5 +6497,6 @@ description: - "Add the day-zero Qwen3.8-Flash-Next NVFP4 AgentX recipe on B300 with SGLang native NEXTN MTP at TP4 and concurrency 1/4/8/12/16." - "Serve RadixArk/Qwen3.8-Flash-Next-NVFP4 with modelopt_fp4 quantization, the trtllm_mha attention backend, and the flashinfer_trtllm MoE runner, following the Qwen3.5 NVFP4 B300 sibling." - - "Pin throughput runs to an interim acceptance length of 3.24 measured at three speculative tokens; eval-only runs keep real target verification." + - "Correct the serve flags to the SGLang cookbook's verified single-node command for this model: TP1 rather than TP4, the flashinfer linear-attention prefill and decode backends, bfloat16 Mamba SSM, and checkpoint-derived quantization." + - "Pin throughput runs to the committed golden thinking_on acceptance length of 2.32 at three speculative tokens; eval-only runs keep real target verification." pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2752 From 65359e7a22ef080c48640f192ad6da6094deb46e Mon Sep 17 00:00:00 2001 From: functionstackx <47992694+functionstackx@users.noreply.github.com> Date: Thu, 27 Aug 2026 00:09:03 -0400 Subject: [PATCH 4/6] Use a float32 Mamba SSM state so the NEXTN verify kernel accepts it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit flashinfer's gated_delta_rule_mtp asserts initial_state.dtype == torch.float32 and aborts CUDA graph capture on the bfloat16 SSM state the cookbook command specifies. Confirmed on the H200 arm, which died at "Capture target verify CUDA graph"; this arm runs the same GDN backend, the same kernel and the same NEXTN, so it would fail identically once it got that far. flashinfer 的 gated_delta_rule_mtp 断言 initial_state 必须为 float32,遇到 cookbook 命令指定的 bfloat16 SSM 状态会在 CUDA graph 捕获阶段中止。该问题已在 H200 分支确认;本分支使用相同的 GDN 后端、相同内核与相同的 NEXTN,运行到同一阶段 必然同样失败。 Co-Authored-By: Claude Opus 5 (1M context) --- .../agentic/qwen3.8next_fp4_b300_sglang_mtp.sh | 9 ++++++++- perf-changelog.yaml | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/benchmarks/single_node/agentic/qwen3.8next_fp4_b300_sglang_mtp.sh b/benchmarks/single_node/agentic/qwen3.8next_fp4_b300_sglang_mtp.sh index 435e9a9405..808aa34fec 100755 --- a/benchmarks/single_node/agentic/qwen3.8next_fp4_b300_sglang_mtp.sh +++ b/benchmarks/single_node/agentic/qwen3.8next_fp4_b300_sglang_mtp.sh @@ -144,7 +144,14 @@ SGLANG_CMD=( # layers take their own backends rather than --attention-backend. --linear-attn-prefill-backend flashinfer --linear-attn-decode-backend flashinfer - --mamba-ssm-dtype bfloat16 + # float32, not the cookbook's bfloat16. With NEXTN enabled the GDN linear + # attention backend routes verification through flashinfer's + # gated_delta_rule_mtp, which asserts initial_state.dtype == torch.float32 + # and aborts CUDA graph capture on a bf16 SSM state: + # AssertionError: initial_state must be float32, got torch.bfloat16 + # flashinfer/gdn_decode.py:761, via gdn_backend.py target_verify + # Confirmed on the H200 arm; same backend, same kernel, same NEXTN here. + --mamba-ssm-dtype float32 --speculative-algorithm NEXTN --speculative-num-steps 3 --speculative-eagle-topk 1 diff --git a/perf-changelog.yaml b/perf-changelog.yaml index 89fa991b42..aadbf523e6 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -6499,4 +6499,5 @@ - "Serve RadixArk/Qwen3.8-Flash-Next-NVFP4 with modelopt_fp4 quantization, the trtllm_mha attention backend, and the flashinfer_trtllm MoE runner, following the Qwen3.5 NVFP4 B300 sibling." - "Correct the serve flags to the SGLang cookbook's verified single-node command for this model: TP1 rather than TP4, the flashinfer linear-attention prefill and decode backends, bfloat16 Mamba SSM, and checkpoint-derived quantization." - "Pin throughput runs to the committed golden thinking_on acceptance length of 2.32 at three speculative tokens; eval-only runs keep real target verification." + - "Use a float32 Mamba SSM state: flashinfer's gated_delta_rule_mtp verify kernel asserts float32 and aborts CUDA graph capture on the bfloat16 state the cookbook command specifies." pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2752 From 7caed5a556ee1ae97f072328fb2c1befa338caa4 Mon Sep 17 00:00:00 2001 From: functionstackx <47992694+functionstackx@users.noreply.github.com> Date: Thu, 27 Aug 2026 00:21:47 -0400 Subject: [PATCH 5/6] Keep the bfloat16 SSM state on Blackwell MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit My previous commit copied the H200 float32 fix here, and SGLang refused to start at all: ValueError: --linear-attn-decode-backend flashinfer on SM100+ requires --mamba-ssm-dtype bfloat16, got 'float32' The two architectures want opposite things. On SM100+ the flashinfer linear attention decode backend requires a bfloat16 state and validates it in server_args before launch. On Hopper the same backend's MTP verify kernel asserts a float32 state during CUDA graph capture. So the cookbook's bfloat16 is correct here and the H200 arm is the exception, not the other way round. Reverted, with the asymmetry written down so neither arm gets 'fixed' to match the other again. 上一个提交把 H200 的 float32 改动照搬到本分支,导致 SGLang 直接拒绝启动:SM100+ 上使用 flashinfer 线性注意力解码后端时必须搭配 bfloat16。两种架构的要求正好相反: SM100+ 在 server_args 中校验并要求 bfloat16;而 Hopper 上同一后端的 MTP 验证内核 在 CUDA graph 捕获阶段要求 float32。因此 cookbook 的 bfloat16 在此处是正确的, H200 才是例外。现已回退,并把这一不对称写入注释,避免两侧再被互相“对齐”。 Co-Authored-By: Claude Opus 5 (1M context) --- .../agentic/qwen3.8next_fp4_b300_sglang_mtp.sh | 14 ++++++-------- perf-changelog.yaml | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/benchmarks/single_node/agentic/qwen3.8next_fp4_b300_sglang_mtp.sh b/benchmarks/single_node/agentic/qwen3.8next_fp4_b300_sglang_mtp.sh index 808aa34fec..3c74588730 100755 --- a/benchmarks/single_node/agentic/qwen3.8next_fp4_b300_sglang_mtp.sh +++ b/benchmarks/single_node/agentic/qwen3.8next_fp4_b300_sglang_mtp.sh @@ -144,14 +144,12 @@ SGLANG_CMD=( # layers take their own backends rather than --attention-backend. --linear-attn-prefill-backend flashinfer --linear-attn-decode-backend flashinfer - # float32, not the cookbook's bfloat16. With NEXTN enabled the GDN linear - # attention backend routes verification through flashinfer's - # gated_delta_rule_mtp, which asserts initial_state.dtype == torch.float32 - # and aborts CUDA graph capture on a bf16 SSM state: - # AssertionError: initial_state must be float32, got torch.bfloat16 - # flashinfer/gdn_decode.py:761, via gdn_backend.py target_verify - # Confirmed on the H200 arm; same backend, same kernel, same NEXTN here. - --mamba-ssm-dtype float32 + # bfloat16 is mandatory on Blackwell: SGLang rejects the launch outright + # with "--linear-attn-decode-backend flashinfer on SM100+ requires + # --mamba-ssm-dtype bfloat16". Hopper wants the opposite -- flashinfer's + # gated_delta_rule_mtp verify kernel asserts a float32 state there -- so + # the H200 arm sets float32 and this one must not follow it. + --mamba-ssm-dtype bfloat16 --speculative-algorithm NEXTN --speculative-num-steps 3 --speculative-eagle-topk 1 diff --git a/perf-changelog.yaml b/perf-changelog.yaml index aadbf523e6..abb203bfd0 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -6499,5 +6499,5 @@ - "Serve RadixArk/Qwen3.8-Flash-Next-NVFP4 with modelopt_fp4 quantization, the trtllm_mha attention backend, and the flashinfer_trtllm MoE runner, following the Qwen3.5 NVFP4 B300 sibling." - "Correct the serve flags to the SGLang cookbook's verified single-node command for this model: TP1 rather than TP4, the flashinfer linear-attention prefill and decode backends, bfloat16 Mamba SSM, and checkpoint-derived quantization." - "Pin throughput runs to the committed golden thinking_on acceptance length of 2.32 at three speculative tokens; eval-only runs keep real target verification." - - "Use a float32 Mamba SSM state: flashinfer's gated_delta_rule_mtp verify kernel asserts float32 and aborts CUDA graph capture on the bfloat16 state the cookbook command specifies." + - "Keep the bfloat16 Mamba SSM state the cookbook specifies: SGLang requires it on SM100 or newer whenever the flashinfer linear-attention decode backend is selected." pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2752 From ad22353bb2af4d26672fb63a7e75fc234b4a6912 Mon Sep 17 00:00:00 2001 From: functionstackx <47992694+functionstackx@users.noreply.github.com> Date: Thu, 27 Aug 2026 01:59:49 -0400 Subject: [PATCH 6/6] Separate the appended changelog entry from history with a blank line MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same fix as PR #2753. validate_perf_changelog.py requires the appended suffix to start with "\n- config-keys:" unless the base file already ends in a blank line, and merge_with_reuse.sh could not resolve the perf-changelog conflict without it: ERROR: new changelog entries must be separated from history by one empty line and appended at the end Historical bytes were already exact; this only inserts the separator. 与 PR #2753 相同的修复。validate_perf_changelog.py 要求追加部分以 "\n- config-keys:" 开头(除非基础文件本身以空行结尾),缺少该空行时 merge_with_reuse.sh 无法解决 perf-changelog 冲突。历史字节本就完全一致,此处仅插入 分隔空行。 Co-Authored-By: Claude Opus 5 (1M context) --- perf-changelog.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/perf-changelog.yaml b/perf-changelog.yaml index abb203bfd0..f911bbd69d 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -6490,6 +6490,7 @@ - "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-fp4-b300-sglang-agentic-mtp scenario-type: