Skip to content

[NVIDIA][H200] Qwen3.8-Flash-Next FP8 SGLang agentic MTP: add FP8 KV + HiCache DRAM arm at conc 16/20/24, no patches / [NVIDIA][H200] Qwen3.8-Flash-Next FP8 SGLang 智能体 MTP:新增 FP8 KV + HiCache DRAM 卸载分支(并发 16/20/24,无补丁) - #5194

Open
asghar07 wants to merge 7 commits into
SemiAnalysisAI:mainfrom
fastpathlabs:fastpath/qwen3.8next-h200-hicache-fp8kv

Conversation

@asghar07

@asghar07 asghar07 commented Nov 23, 2026 •

Copy link
Copy Markdown

Summary

At 16 agents the H200 Qwen3.8-Flash-Next FP8 AgentX cell is limited by KV-cache space, not by compute. The current recipe runs a BF16 KV cache with no offload. In our runs of that recipe the GPU KV pool (2,097,856 tokens, max_total_num_tokens) was up to 99% held by running requests at concurrency 16. The server evicted cached prefixes, the prefix-cache hit rate was 89% against a trace limit of 96%, and the server computed about 26 million prompt tokens per hour, about 16 million more than the trace limit requires.

This PR adds one search-space entry to qwen3.8next-fp8-h200-sglang-agentic-mtp that turns on two upstream SGLang features. The image, model and all other server settings stay the same. There is no custom image, no patch and no setup script.

  • FP8 KV cache: kv-cache-dtype: fp8_e4m3. The GPU KV pool grows from 2.10M to 3.96M tokens (1.9x). The draft KV inherits FP8 from the target, which CONTRIBUTING.md lists as allowed ("FP8 draft KV inherited from an FP8 target"). We set no draft-specific dtype. The draft is the embedded FP8 MTP head of Qwen/Qwen3.8-Flash-Next-FP8, served as shipped.
  • HiCache host-DRAM offload: enable-hierarchical-cache, hicache-size: 50 (GB per rank), hicache-io-backend: kernel, hicache-mem-layout: page_first, hicache-write-policy: write_back. Evicted prefixes stay in host memory, inside the 308 GB DRAM share the matrix gives each point (dram-utilization: 0.8).

Changes:

  • configs/nvidia-master.yaml: one new TP2/EP2 entry, kv-offloading: dram with the hicache backend, conc-list: [16, 20, 24], same agentic.yaml. The GPU-KV entries are unchanged.
  • srt-slurm-recipes/qwen3.8next/sglang/h200-fp8-mtp/agentic.yaml: new overrides override_tp2_c16_hicache, override_tp2_c20_hicache and override_tp2_c24_hicache. Admission and decode CUDA graphs are 2x CONC (32, 40, 48), as in override_tp2_c16. override_tp2_c16 now also names KV_OFFLOADING: none, so the stock and HiCache points at c16 each select one variant. This changes the fingerprint of the stock c16 point, so the sweep re-runs it next to the new arm.
  • perf-changelog.yaml: one entry appended at the end.

Measured effect (our runs, not InferenceX CI)

We ran the stock recipe and this arm on our own 2x H200 SXM nodes, with the same image (lmsysorg/sglang:v0.5.23-cu130@sha256:f832b5c3…) and the InferenceX AgentX client and traces. We ran 3 pre-registered runs on 2 nodes, with a 1-hour window for each point. Stock at 16 agents is the mean of 2 stock points in each run (6 points in all). Full method and raw data: paper DOI 10.5281/zenodo.24457433, data https://doi.org/10.5281/zenodo.24457618.

Conc KV Total tok/s/GPU (InferenceX run 447792 / stock, ours / this arm) TPOT p50 / p90, ms (InferenceX / stock / this arm) TTFT p50 / p90, s (InferenceX / stock / this arm) Request errors
16 GPU (stock) vs FP8 + HiCache 34,070 / 34,178 / 37,995 9.8 / 18.2 · 9.7 / 18.1 · 8.9 / 13.6 0.48 / 2.72 · 0.45 / 2.53 · 0.45 / 0.93 0
20 FP8 + HiCache – / – / 45,763 – · – · 10.5 / 14.3 – · – · 0.48 / 1.02 0
24 FP8 + HiCache – / – / 54,476 – · – · 11.6 / 18.1 – · – · 0.50 / 1.23 0
  • At c16 the arm gave +11.18% total tok/s/GPU over same-node stock (range +9.83% to +12.04% over 3 runs; the largest gap between the 2 stock points of one run was 2.47%). It gave +11.5% over the published point run 447792.
  • P90 interactivity at c16 rose from 55 to 73 tok/s/user. At c24 the arm gives 54,476 tok/s/GPU at the same P90 interactivity as stock at c16 (55 tok/s/user).
  • GSM8K (100 questions) was 0.99 for this arm and 0.98–0.99 for stock.
  • At c8 the arm gives nothing (−1.7% to +0.2%) and at c14 about +5% (+4.9% to +5.7%). The gain is largest at c16 and above, so the arm starts at c16.

Known gaps:

  • Timing used a fixed MTP acceptance length (SGLANG_SIMULATE_ACC_LEN=2.32) in both arms, as InferenceX does. Throughput and TPOT do not include any change in real acceptance. On the GSM8K servers, which use real acceptance, the FP8-KV arm accepted about 4% fewer tokens per step at full batch (3.13 against 3.27). A real-acceptance run on agent traces could show a smaller gain.
  • These are our machines, not the InferenceX runners. The PR sweep is the number that counts.
  • In run 2, one stock c16 attempt ran out of GPU memory (a 434 MB allocation failed with 78 MB free, about 105 s after start). It served 34 requests before its watchdog stopped it. We re-ran only that point, and the re-run (run 2) was clean. The pre-registered plan did not allow this repeat, so the paper lists it as a deviation. The six stock points above are all valid. The arm in this PR never failed.
  • This is a fork PR. A maintainer needs to apply the primary sweep label (full-sweep-fail-fast). The CODEOWNER sign-off needs the SGLang cookbook PR ([Doc] [NVIDIA] cookbook: Qwen3.8-Flash-Next H200, add FP8 KV + HiCache commands for concurrency 16-24 sgl-project/sglang#52597) merged first.
  • At c16 the host-memory tier served only 0.25% of prompt tokens. We did not measure how the gain splits between FP8 KV and HiCache.
  • Our runs used the GSM8K check with 100 questions. The sweep's evals will use the full set.
AI model disclosure
  • Model/version: claude-opus-5-5 (Claude Code), as exposed by the runtime.
  • Role: read the InferenceX config, recipe, matrix generator and contribution rules. Wrote the recipe, config and changelog edits and this description. Checked locally that the matrix generates and that each point selects exactly one recipe variant. claude-opus-5-5 subagents reviewed the description against the paper and the contribution rules. The FastPathLabs authors directed and reviewed the change.
PR checklist and change type

Type of Change

  • Bug fix
  • New feature
  • Configuration change
  • Documentation update
  • Other (please describe)

Checklist

  • I have completed the AI model disclosure and kept it current
  • I have tested my changes locally
  • I have updated documentation if necessary
  • If python -m infx.matrix.changed --base origin/main lists affected config keys, I have appended one new entry covering them to the physical end of inferencex-e2e/perf-changelog.yaml; if it lists none, I have added none. I have not edited historical entries
  • If this PR appends an inferencex-e2e/perf-changelog.yaml entry, it carries exactly one primary sweep label (a maintainer applies it on fork PRs): full-sweep-fail-fast (recommended), full-sweep-enabled, or non-canary-full-sweep-enabled. Optional modifiers all-evals, evals-only, and agentx-fast require a primary label; the last two block reuse while applied.
  • Before merging via reuse, a maintainer with write access to the repository has commented /use <run_id> (or the legacy /reuse-sweep-run) on this PR. Do this only once there is a final full sweep that is all green with evals passing, since after this comment the primary sweep label will no longer automatically kick off new sweeps. Remove and re-add the primary sweep label to force a new sweep.

Local testing: matrix generation (infx.matrix.changed: 1 of 219 config keys changed, 4 points added, 1 removed) and recipe selection only. pytest was not run. Nothing ran on InferenceX runners. The GPU results above come from our own nodes.

Additional detail section
中文

摘要

在 16 个智能体并发下,H200 上 Qwen3.8-Flash-Next FP8 AgentX 配置的瓶颈是 KV cache 容量,而不是算力。当前 recipe 使用 BF16 KV cache,且不做卸载。我们复现该 recipe 时,并发 16 下运行中的请求最高占用 GPU KV 池(2,097,856 tokens)的 99%,服务器驱逐了已缓存的前缀,前缀缓存命中率为 89%(trace 理论上限 96%),每小时需计算约 2,600 万个 prompt token,比 trace 理论上限所需多约 1,600 万个。

本 PR 为 qwen3.8next-fp8-h200-sglang-agentic-mtp 新增一个搜索空间条目,启用 SGLang 上游已有的两项功能,镜像、模型和其他服务器设置均不变。不使用自定义镜像、不打补丁,也没有 setup 脚本。

  • FP8 KV cache: kv-cache-dtype: fp8_e4m3,GPU KV 池从 2.10M 增至 3.96M tokens(1.9 倍)。草稿模型的 KV 继承目标模型的 FP8(CONTRIBUTING.md 明确允许),未单独设置草稿 dtype。
  • HiCache 主机 DRAM 卸载: enable-hierarchical-cache,hicache-size: 50(每个 rank,GB),kernel IO,page_first 布局,write_back 策略,位于矩阵为每个点分配的 308 GB DRAM 份额之内。

改动:nvidia-master.yaml 新增 TP2/EP2 条目(kv-offloading: dram,后端 hicache,conc-list: [16, 20, 24]);agentic.yaml 新增 override_tp2_c16_hicache、override_tp2_c20_hicache、override_tp2_c24_hicache(准入与 decode CUDA graph 为 2x CONC);override_tp2_c16 增加 KV_OFFLOADING: none,使 c16 的两个点各自只匹配一个变体,因此 sweep 会重跑 c16 基线;perf-changelog.yaml 末尾追加一条。

实测效果(我们的机器,非 InferenceX CI)

3 次预注册运行、2 个节点、每点 1 小时。并发 16 下,相对同节点基线吞吐(tok/s/GPU)提升 +11.18%(范围 +9.83% 至 +12.04%),相对已发布点 run 447792(34,070)提升 +11.5%(37,995);P90 TTFT 从 2.53 s 降至 0.93 s;P90 交互性从 55 升至 73 tok/s/user;GSM8K(前 100 题)该分支 0.99,基线 0.98–0.99。并发 24 下达到 54,476 tok/s/GPU,P90 交互性与基线并发 16 相同。并发 8 下无收益(−1.7% 至 +0.2%),并发 14 约 +5%(+4.9% 至 +5.7%),因此该分支从并发 16 开始。

计时使用固定 MTP 接受长度(SGLANG_SIMULATE_ACC_LEN=2.32,两组相同,与 InferenceX 一致),吞吐量与 TPOT 不反映真实接受率的变化;GSM8K 真实接受率下 FP8 KV 每步少接受约 4%(3.13 对 3.27)。以上为我们自有机器上的结果,以 PR 扫描结果为准。run 2 的一次基线 c16 尝试出现 GPU OOM,仅重跑该点后正常(预注册计划不允许此重跑,论文将其列为偏差);SGLang cookbook PR(sgl-project/sglang#52597)需先合并,CODEOWNER 才能签核;本分支未出错。并发 16 下主机内存层仅提供 0.25% 的 prompt token,FP8 KV 与 HiCache 各自的贡献未单独测量。GSM8K 仅用前 100 题,扫描评估将使用完整测试集。

AI 模型使用说明

claude-opus-5-5(Claude Code)阅读了 InferenceX 配置、recipe、矩阵生成器与贡献规则,编写了 recipe、配置、changelog 修改及本说明,并在本地检查矩阵生成与每个点只匹配一个 recipe 变体。claude-opus-5-5 子代理对照论文与贡献规则审阅了本说明。FastPathLabs 作者指导并审阅了改动。


FastPathLabs: Asghar Ali, Muthu Durai, Mohamed Hussain, Asif Ali.

…+ HiCache DRAM arm at conc 16/20/24

Assisted-by: Claude Code

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the contribution!

  • Review: If this PR changes files owned by someone other than a repository admin or @SemiAnalysisAI/core, ask one eligible CODEOWNER to complete the latest PR_REVIEW_CHECKLIST.md before contacting a core maintainer on Slack. Follow the template exactly, including As a PR reviewer and CODEOWNER, I have reviewed this and have, so sign-off verification triggers.
  • PR verification: Sweeps run only when the PR appends an inferencex-e2e/perf-changelog.yaml entry and carries exactly one primary label: full-sweep-fail-fast (strongly recommended; canary plus per-matrix fail-fast), full-sweep-enabled (canary; matrix jobs continue after a failure), or non-canary-full-sweep-enabled (no canary or fail-fast). The modifiers all-evals, evals-only, and agentx-fast require a primary label. On fork PRs, a maintainer applies the label. See sweep labels and reuse.
  • After merging: PR authors must ensure all GitHub Actions jobs pass. Transient failures often pass on rerun; see how to rerun failed jobs.
中文

感谢你的贡献!

  • **审阅:**如果 PR 修改的文件归属于仓库管理员及 @SemiAnalysisAI/core 之外的 CODEOWNER,请先联系一位有资格的 CODEOWNER 填写最新的 PR_REVIEW_CHECKLIST.md,再通过 Slack 联系核心维护者。必须严格遵循模板,并保留 As a PR reviewer and CODEOWNER, I have reviewed this and have,才能触发签核验证。
  • **PR 验证:**只有当 PR 在 inferencex-e2e/perf-changelog.yaml 末尾追加了条目,并且恰好带有一个主标签时,才会运行扫描:full-sweep-fail-fast(强烈推荐;canary 加逐矩阵 fail-fast)、full-sweep-enabled(有 canary;矩阵任务在失败后继续运行)或 non-canary-full-sweep-enabled(无 canary,也无 fail-fast)。修饰标签 all-evals、evals-only 和 agentx-fast 必须与主标签一起使用。fork PR 的标签由维护者添加。参见扫描标签与复用。
  • **合并后:**PR 作者必须确保所有 GitHub Actions 任务通过。临时性失败通常可以通过重新运行恢复;参见重新运行失败任务的说明。

@asghar07

Copy link
Copy Markdown
Author

@Ankur-singh, could you take a look when you have time? This adds an FP8 KV + HiCache arm to the H200 Qwen3.8-Flash-Next cell you extended in #4272. As a fork PR it needs a maintainer to apply full-sweep-fail-fast. The SGLang cookbook PR it depends on is sgl-project/sglang#52597.

@nvpohanh

Copy link
Copy Markdown
Collaborator

[by Claude Code] The SGLang cookbook integration of this PR's AgentX config (qwen3.8next-fp8-h200-sglang-agentic-mtp) will happen in sgl-project/sglang#53052, in the Agentic Long-Context Deployment section of the Qwen3.8-Flash-Next cookbook page.

This PR has no authorized /use <run_id> comment yet, so the cookbook shows the recipe at this PR's head (87fa65b02) as "in progress". A later cookbook PR switches it to the measured run once a run is pinned or this PR merges.

@nvpohanh

Copy link
Copy Markdown
Collaborator

[by Claude Code] sgl-project/sglang#53052 has been merged. This PR's AgentX config (qwen3.8next-fp8-h200-sglang-agentic-mtp) is now in the Agentic Long-Context Deployment section of the SGLang Qwen3.8-Flash-Next cookbook: https://docs.sglang.io/cookbook/autoregressive/Qwen/Qwen3.8-Flash-Next#agentic-long-context-deployment

This PR has no authorized /use <run_id> comment yet, so the cookbook shows the recipe at this PR's head (87fa65b02) as "in progress". A later cookbook PR switches it to the measured run once a run is pinned or this PR merges.

asghar07 and others added 2 commits November 26, 2026 00:45
Resolve conflicts after SemiAnalysisAI#4763 (explicit worker GPU resources) and SemiAnalysisAI#4766 (legacy CPU DRAM limits removed):
- nvidia-master.yaml: take main's search-space and add the HiCache row with gpus-per-worker: 2.
- agentic.yaml: drop gpus: 2 from the three HiCache overrides and TOTAL_CPU_DRAM_GB from their client env.
- perf-changelog.yaml: resolved with infx.workflows.prepare_perf_changelog_merge; drop the dram-utilization wording from this PR's entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
perf-changelog.yaml resolved with infx.workflows.prepare_perf_changelog_merge after SemiAnalysisAI#5193; validate_perf_changelog passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@asghar07

Copy link
Copy Markdown
Author

Thank you, @nvpohanh, for adding this config to the SGLang cookbook in sgl-project/sglang#53052.

I merged main and the conflicts are gone. The HiCache row now uses gpus-per-worker: 2 (#4763), the recipe no longer sets TOTAL_CPU_DRAM_GB (#4766), and validate_perf_changelog passes. infx.matrix.changed shows 4 points added and 1 removed, all under qwen3.8next-fp8-h200-sglang-agentic-mtp.

As a CODEOWNER for the H200 recipes, could you do the PR Review Checklist sign-off, or apply full-sweep-fail-fast to this head so the sweep can run? I can change the concurrency levels if that helps the runners.

@nvpohanh

Copy link
Copy Markdown
Collaborator

[by Claude Code] The SGLang cookbook update of this PR's AgentX config (qwen3.8next-fp8-h200-sglang-agentic-mtp) will happen in sgl-project/sglang#53390, in the Agentic Long-Context Deployment section of the Qwen3.8-Flash-Next cookbook page. The config has been live in that section since sgl-project/sglang#53052; sgl-project/sglang#53390 refreshes it with the pin below.

This PR has no authorized /use <run_id> comment yet, so the cookbook shows the recipe at this PR's head (e96c42c19) as "in progress". A later cookbook PR switches it to the measured run once a run is pinned or this PR merges.

@nvpohanh

Copy link
Copy Markdown
Collaborator

[by Claude Code] sgl-project/sglang#53390 has been merged. This PR's AgentX config (qwen3.8next-fp8-h200-sglang-agentic-mtp) is now in the Agentic Long-Context Deployment section of the SGLang Qwen3.8-Flash-Next cookbook: https://docs.sglang.io/cookbook/autoregressive/Qwen/Qwen3.8-Flash-Next#agentic-long-context-deployment

This PR has no authorized /use <run_id> comment yet, so the cookbook shows the recipe at this PR's head (e96c42c19) as "in progress". A later cookbook PR switches it to the measured run once a run is pinned or this PR merges.

asghar07 and others added 2 commits November 26, 2026 10:43
perf-changelog.yaml resolved with infx.workflows.prepare_perf_changelog_merge;
validate_perf_changelog passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t-h200-hicache-fp8kv

# Conflicts:
#	inferencex-e2e/perf-changelog.yaml

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants