Skip to content

fix(agentx): Dynamo frontend total, vLLM P/D roles and SGLang non-device tiers / Dynamo 前端总率、vLLM P/D 角色与 SGLang 非 GPU 层 - #4164

Open
chunfangamd wants to merge 19 commits into
chun/agentx-phase-validity-trtfrom
chun/agentx-cache-roles-frontend
Open

chunfangamd wants to merge 19 commits into
chun/agentx-phase-validity-trtfrom
chun/agentx-cache-roles-frontend

Conversation

@chunfangamd

@chunfangamd chunfangamd commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Keep cache reuse and its source consistent across vLLM, Dynamo and SGLang:

  • vLLM excludes decode transfer counters. Declared endpoint roles also apply to workers without role labels; conflicts with explicit labels remain unresolved.
  • Dynamo uses frontend counters for measured overall reuse. Router estimates stay flat diagnostics and do not enter the nested measured result or publish a measured validity core.
  • SGLang external reuse includes host + storage; normalized token details use the same sum. CPU still means host reuse.

Base: #4163. Saved collector inputs were replayed through the actual producer CLI and app consumer selection. This does not certify live serving or extend exact-pricing eligibility to every framework. Consumer deployment remains coordinated with app #1377.

中文

本层让 vLLM、Dynamo、SGLang 的复用数值与来源一致:vLLM 排除 decode 传输,对无角色标签的 worker 使用明确 endpoint roles;与显式标签冲突仍保持 unresolved。Dynamo frontend counter 才提供 overall 实测,router 估算仅保留 flat 诊断,不进入 nested 实测或发布实测 core。SGLang external 与 normalized token 均包含 host+storage,CPU 仍只指 host。

依赖 #4163,已使用保存输入执行实际 producer CLI 与消费端选择重放;不宣称真实服务验收,也不扩大各框架精确计价资格。消费端上线仍需与 app #1377 协调。

AI model disclosure

GPT-6 (Codex), including delegated implementation and independent review agents, prepared and checked these revisions. A finer runtime model identifier is not exposed. Earlier producer/app work was prepared by an agent reporting Claude Opus 5.5; that historical runtime identifier could not be independently verified.

…ice tiers

- Dynamo: the frontend cached/input total reaches the nested overall, a
  measured 0 is kept instead of the router estimate, and overall_source
  records worker_counters, frontend or router_estimate.
- vLLM P/D: when every cache series carries a role and prefill is present,
  only prefill series count, because decode workers report transferred prompt
  tokens as external_kv_transfer. role_scope records prefill, mixed or
  combined.
- SGLang: external carries every non-device tier (host and storage), so
  consumers that price GPU + external no longer drop storage hits.

The vLLM role fix lowers P/D rates. Until the AIPerf warmup fix is pinned
(SemiAnalysisAI/agentx-harness#49), prefill counters still carry the
cold-cache warmup, so this should ship with or after that fix.

Dynamo 前端总率进入嵌套 overall,测得的 0 不再被 router 估计值替换,并以 overall_source 标注来源;vLLM P/D 在所有缓存序列都带角色且存在 prefill 时只统计 prefill(decode 把传输来的 prompt 计为 external_kv_transfer),以 role_scope 标注;SGLang 的 external 包含所有非 GPU 层(host 与 storage)。vLLM 的角色修正会降低 P/D 命中率;在 AIPerf warmup 修复(agentx-harness#49)固定版本之前,prefill 计数仍含冷缓存 warmup,因此应与该修复同时或在其后发布。
@chunfangamd

chunfangamd commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator Author

Updated to 53904d34b268617072c20df60f9337f3919c4af4 on #4163, with current main inherited. Declared vLLM endpoint roles now cover unlabeled workers; SGLang normalized external tokens include storage. Dynamo router estimates remain diagnostics: the inherited test was updated to assert that contract rather than promoting an estimate into measured overall. Saved collector positive/negative inputs retain their expected CLI and consumer behavior. Current-head CI passed. Live framework serving and consumer policy activation are still separate deployment gates.

中文

已同步当前 main 与 #4163,补齐 vLLM 无标签 worker 的明确端点角色及 SGLang storage token 明细。Dynamo router 仍仅作诊断;继承的测试现明确断言这一合同,不把估算提升为 overall 实测。保存的正负例经过实际 CLI 与消费端重放,行为保持预期,新 head CI 通过。真实框架 serving 与消费端策略启用仍是独立部署门禁。

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

inferencex-e2e/infx diff: +484 -32

Generally most InferenceX submissions don't need to add changes to the infx package. On the off chance they do, generally the diff is small. Please prompt your agent to clean your PR to keep your diff to only necessary & minimal changes too. We have an increased code quality bar for changes to the infx package.

中文

大多数 InferenceX 提交通常不需要修改 infx 包。即使确实需要,改动通常也很小。请让你的 agent 清理 PR,使改动只包含必要且最小的内容。infx 包的改动有更高的代码质量要求。

@claude

claude Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @chunfangamd's task in 1m 11s —— View job


Review of PR #4164

  • Gather context (diff against origin/chun/agentx-phase-validity-trt)
  • Review the Dynamo, vLLM, SGLang and common changes
  • Post inline findings

I found two warnings and no blocking issues. Details are in the inline comments:

  1. 🟡 dynamo_vllm.py:98-101: The router's shared-cache estimate now goes into the nested overall_cache_hit_rate. Because of that, summarize_cache_validity marks it published=True, basis="combined". overall_source is not copied into that summary, so consumers of it can't tell the estimate from a measurement.
  2. 🟡 vllm.py:336-337: In the mixed role scope, nothing is filtered. Series explicitly labelled decode are still counted, so decode-side external_kv_transfer counts as a cache hit again.

The SGLang external change, the sum_by_label series_filter and the fix that keeps a measured frontend 0 look correct. No perf-changelog.yaml entry is needed, because the change only touches result processing.

I could not run the tests in this environment because uv run pytest needed approval. Neither issue was reproduced, and the suggested fixes are untested.

Comment thread inferencex-e2e/infx/results/agentic/backends/dynamo_vllm.py Outdated
Comment thread inferencex-e2e/infx/results/agentic/backends/vllm.py Outdated

@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.

Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.

Comment thread inferencex-e2e/infx/results/agentic/backends/vllm.py Outdated
将 vLLM、Dynamo、SGLang 修复迁移到新的共享资格基线,保留原有算法。
合入资格测试去重,框架算法保持不变。
按部署角色排除 decode 传输,保留未知角色遥测但不授予计价资格;router 估计仅保留诊断,增加角色、来源及 profiling 总量回归。
合入前置阶段与请求范围修复,保留框架角色及来源隔离的独立差异。
合入空 metrics 与前端总量的严格校验,保持各框架独立修复。
合入前置 TRT 角色校验边界,保留框架修复的独立差异。
显式非法或空角色不能作为无标签聚合回退发布复用率,保留真正无标签的遥测路径并增加行为边界覆盖。
合入 histogram 前端总量支持及跨范围来源分解隔离。
中文:继承精简后的 TRT 计数与共享资格合同,保留框架修复的独立差异。
中文:继承现代 ATOM 诊断独立性回归,保持本层产品差异。
中文:继承 TRT 非 worker 角色拒绝,保留本层独立差异。
中文:继承非法 frontend 总量处理,保留本层框架修复。
将已声明的 endpoint 角色传入 vLLM 与 Dynamo,避免无角色标签的 decode 传输进入命中率;冲突角色保留未知状态。同步 SGLang normalized external token 与 storage 命中率,并补充行为回归。
中文:同步 TRT 维护与当前 main,保留 vLLM、Dynamo 和 SGLang 独立增量。
中文:按仓库格式整理端点角色处理及其回归测试。
同步最新 TRT 与 main 前置修复,保留 vLLM 显式角色、Dynamo 来源区分和 SGLang storage token 一致性,并保留上游文档更新。
按既定 review 合同更新上游新增的 Dynamo 回归:frontend 的真实零和 25% 保留;router-only 的 55% 仅作为 flat 诊断,不能进入 nested 实测或 published core。

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.

1 participant