Skip to content

feat(inference): guard only vLLM vs SGLang, per hardware SKU / 引擎互斥限定为 vLLM 与 SGLang,并按硬件 SKU 划分 - #711

Merged
functionstackx merged 1 commit into
masterfrom
feat/per-hardware-engine-guard
Aug 9, 2026
Merged

feat(inference): guard only vLLM vs SGLang, per hardware SKU / 引擎互斥限定为 vLLM 与 SGLang,并按硬件 SKU 划分#711
functionstackx merged 1 commit into
masterfrom
feat/per-hardware-engine-guard

Conversation

@functionstackx

@functionstackx functionstackx commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Applies one engine-comparability matrix to both Agentic Traces and 8K/1K, scoped to a single hardware SKU.

Pair (same SKU) Standard-token MTP
vLLM ↔ SGLang blocked blocked
TRTLLM ↔ vLLM allowed allowed (was blocked on Agentic)
TRTLLM ↔ SGLang allowed allowed (was blocked on Agentic)
TRTLLM ↔ ATOM allowed allowed (was blocked on Agentic)
ATOM ↔ vLLM or SGLang allowed allowed

Per hardware means exactly what it says: B200 vLLM + B200 SGLang is blocked; B200 vLLM + B300 anything is allowed.

The two changes that produce it

1. Agentic Traces gains the exclusionFamilies allowlist that 8K/1K already had (data-mappings.ts). Agentic guarded every engine family while the agentic benchmark was new, so TRTLLM and ATOM were blocked against vLLM and SGLang there. It now shares the same ['vllm', 'sglang'] list. Because that list is matched before groupAliases, ATOM escapes the rule that otherwise folds it into SGLang's comparability group — which is what makes the ATOM row allowed without deleting the alias.

2. The model-level MTP spec becomes scope: 'hardware', matching the standard-token spec. It was global, so selecting B200 SGLang MTP blocked MI355X vLLM MTP — a pure hardware comparison, which is the point of the chart. Same-SKU cross-engine MTP is still blocked.

The guard exists to stop two engines being read off one SKU's curve, not to stop a chart holding two SKUs, so hardware scope is now the rule everywhere. EIGHTK_ONEK_EXCLUSION_FAMILIES is renamed GUARDED_ENGINE_FAMILIES since both scenarios share it, and the matrix above is recorded in the comment above the constant.

No changes to exclusion.ts — the engine already supported both participatingFamilies and scope: 'hardware'. This is a data change to the rule set, which is how that module is designed to be extended.

Scope note. The MTP spec is attached to Model.DeepSeek_V4_Pro, the only model that declares one, so the MTP column applies there; other models have no MTP guard to begin with. The hardware-scope fix also reaches the deprecated 1K/1K and 1K/8K sequences, since the model rule applies on every scenario — same direction of change, and they carry no scenario rule of their own.

Tests

comparison-exclusion.test.ts — the table-driven toggle cases now assert the full matrix on both scenarios, and every previously-global MTP case is split into a same-SKU case (still block) and a different-SKU case (now fallthrough):

  • Agentic: TRTLLM ↔ vLLM, TRTLLM ↔ SGLang, ATOM ↔ vLLM MTP, TRTLLM ↔ ATOM MTP all fall through; vLLM ↔ SGLang still blocks on the same SKU, allowed across SKUs
  • 8K/1K and 1K/1K: cross-engine MTP blocks on the same SKU, falls through across SKUs
  • The two groupOf tests became it.each over both scenarios: ATOM/TRTLLM resolve to null (unguarded), vLLM/SGLang keep their groups through every dynamo-/mori-/llmd- prefix
  • New: asserts scopesOf is exactly ['b200'] — never the global scope — for standard-token and MTP keys alike, across all three scenarios

data-mappings.test.ts — updated the allowlist assertion to cover both scenarios.

bun run test:unit3,744 passed, 0 failed. typecheck, lint, fmt clean.

Overlay note: comparisonExclusion returns null for unofficial runs, so ?unofficialrun= previews deliberately impose no engine guard. That behavior is unchanged and still covered by its existing test.

中文说明

为**「智能体轨迹」(Agentic Traces)与 8K/1K 两个场景应用同一套引擎可比性矩阵,并限定在单一硬件 SKU** 范围内。

配对(同一 SKU) 标准 token MTP
vLLM ↔ SGLang 阻止 阻止
TRTLLM ↔ vLLM 允许 允许(此前在智能体场景下被阻止)
TRTLLM ↔ SGLang 允许 允许(此前在智能体场景下被阻止)
TRTLLM ↔ ATOM 允许 允许(此前在智能体场景下被阻止)
ATOM ↔ vLLM 或 SGLang 允许 允许

"按硬件划分"即:B200 vLLM 与 B200 SGLang 不可同时选中;B200 vLLM 与 B300 的任意配置可同时选中。

由两处改动实现。 其一,智能体场景新增 8K/1K 已有的 exclusionFamilies 允许列表(data-mappings.ts)。此前该场景在智能体基准测试尚新时限制所有引擎 family,导致 TRTLLM 与 ATOM 无法与 vLLM、SGLang 同时选中;现改为共用同一份 ['vllm', 'sglang'] 列表。由于该列表在 groupAliases 之前匹配,ATOM 得以不受"折叠进 SGLang 可比性分组"规则的影响——这正是无需删除该别名即可放开 ATOM 一行的原因。其二,模型级 MTP 规则改为 scope: 'hardware',与标准 token 规则一致;此前为全局范围,导致选中 B200 SGLang MTP 后无法再选 MI355X vLLM MTP,而这是纯粹的硬件对比,正是图表意在支持的用法。同一 SKU 内的跨引擎 MTP 仍被阻止。

该限制的目的是避免在同一 SKU 的曲线上混读两种引擎,而非限制图表同时展示两种硬件,因此现统一采用硬件范围。常量 EIGHTK_ONEK_EXCLUSION_FAMILIES 因两个场景共用而更名为 GUARDED_ENGINE_FAMILIES,上述矩阵已写入该常量上方的注释。exclusion.ts 未作改动——引擎本身已支持 participatingFamiliesscope: 'hardware',本次仅调整规则数据,这正是该模块的预期扩展方式。

适用范围说明: MTP 规则挂在 Model.DeepSeek_V4_Pro 上(目前唯一声明该规则的模型),因此 MTP 一列适用于该模型;其他模型本就没有 MTP 限制。硬件范围的修正同样作用于已弃用的 1K/1K 与 1K/8K 序列(模型级规则在所有场景生效),变化方向一致,且这两个序列本身没有场景级规则。

测试: comparison-exclusion.test.ts 的表驱动用例现在在两个场景下均断言完整矩阵,且每个原先的全局 MTP 用例都拆分为同 SKU(仍为 block)与跨 SKU(现为 fallthrough)两种情形;两个 groupOf 用例改为对两个场景 it.each,验证 ATOM/TRTLLM 解析为 null(不受限制),vLLM/SGLang 在各类 dynamo-/mori-/llmd- 前缀下仍归入各自分组;新增用例断言 scopesOf 恒为 ['b200'] 而非全局范围,覆盖标准 token 与 MTP 键、三个场景。data-mappings.test.ts 的允许列表断言更新为覆盖两个场景。bun run test:unit 3,744 项全部通过;typechecklintfmt 均通过。

覆盖层说明:comparisonExclusion 对非官方运行返回 null,即 ?unofficialrun= 预览有意不施加引擎限制;该行为未变,且仍由既有用例覆盖。

🤖 Generated with Claude Code


Note

Medium Risk
Changes which inference configs can be selected together on official Agentic and DSV4 MTP charts; wrong rules could mislead benchmark comparisons, but behavior is heavily covered by updated unit tests and no exclusion engine code changed.

Overview
Inference chart engine comparability rules for DeepSeek V4 Pro are tightened so users can mix more engines on one graph while still blocking misleading same-SKU vLLM vs SGLang pairs.

Agentic Traces now uses the same exclusionFamilies allowlist as 8K/1K (vllm, sglang only). TRTLLM, ATOM, and related stacks are no longer mutually exclusive with vLLM/SGLang on Agentic (standard-token and MTP), matching 8K/1K behavior.

The model-level MTP rule gains scope: 'hardware', so cross-engine MTP blocks apply per SKU (e.g. B200 SGLang MTP vs B200 vLLM MTP) but not across hardware (e.g. B200 vs MI355X). STP rules were already hardware-scoped; MTP now follows the same intent.

EIGHTK_ONEK_EXCLUSION_FAMILIES is renamed GUARDED_ENGINE_FAMILIES and shared by both scenarios. Tests document the full per-SKU matrix and split former “global MTP” cases into same-SKU block vs cross-SKU allow.

Reviewed by Cursor Bugbot for commit a42b491. Bugbot is set up for automated code reviews on this repo. Configure here.

Apply one engine-comparability matrix to both Agentic Traces and 8K/1K,
scoped to a single hardware SKU. Per SKU:

  vLLM <-> SGLang          blocked (standard-token and MTP)
  TRTLLM <-> vLLM          allowed (MTP was blocked on Agentic)
  TRTLLM <-> SGLang        allowed (MTP was blocked on Agentic)
  TRTLLM <-> ATOM          allowed (MTP was blocked on Agentic)
  ATOM <-> vLLM or SGLang  allowed

Two changes produce it:

- Agentic Traces gains the same `exclusionFamilies` allowlist 8K/1K
  already had. It previously guarded every engine family while the
  agentic benchmark was new, which blocked TRTLLM and ATOM against vLLM
  and SGLang. Because the allowlist is matched before `groupAliases`,
  ATOM escapes the rule that folds it into SGLang's group.
- The model-level MTP spec becomes `scope: 'hardware'`, like the
  standard-token spec. It was global, so B200 SGLang MTP blocked
  MI355X vLLM MTP — a hardware comparison, which is the point of the
  chart. Same-SKU cross-engine MTP is still blocked.

The guard exists to stop two engines being read off one SKU's curve, not
to stop a chart holding two SKUs, so hardware scope is the rule
everywhere now. `EIGHTK_ONEK_EXCLUSION_FAMILIES` is renamed
`GUARDED_ENGINE_FAMILIES` since both scenarios share it.

中文:为「智能体轨迹」(Agentic Traces)与 8K/1K 两个场景应用同一套引擎
可比性矩阵,并限定在单一硬件 SKU 范围内。同一 SKU 下:vLLM ↔ SGLang
阻止(标准 token 与 MTP 均是);TRTLLM ↔ vLLM、TRTLLM ↔ SGLang、
TRTLLM ↔ ATOM 允许(此前在智能体场景下 MTP 被阻止);ATOM ↔ vLLM 或
SGLang 允许。

由两处改动实现:其一,智能体场景新增与 8K/1K 相同的 `exclusionFamilies`
允许列表——此前该场景在智能体基准测试尚新时对所有引擎family 加以限制,
导致 TRTLLM 与 ATOM 无法与 vLLM、SGLang 同时选中;由于允许列表在
`groupAliases` 之前匹配,ATOM 得以不受"折叠进 SGLang 分组"规则的影响。
其二,模型级 MTP 规则改为 `scope: 'hardware'`,与标准 token 规则一致——
此前为全局范围,导致选中 B200 SGLang MTP 后无法再选 MI355X vLLM MTP,
而这正是图表意在支持的硬件对比;同一 SKU 内的跨引擎 MTP 仍被阻止。

该限制的目的是避免在同一 SKU 的曲线上混读两种引擎,而非限制图表同时
展示两种硬件,因此现统一采用硬件范围。常量 `EIGHTK_ONEK_EXCLUSION_FAMILIES`
因两个场景共用而更名为 `GUARDED_ENGINE_FAMILIES`。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
inferencemax-app Ready Ready Preview Aug 9, 2026 10:21pm

Request Review

@functionstackx
functionstackx merged commit 27bfaa6 into master Aug 9, 2026
24 checks passed
@functionstackx
functionstackx deleted the feat/per-hardware-engine-guard branch August 9, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant