Skip to content

Check spec-decoding labels and record what each point drafts with / 校验投机解码标签并记录各点位实际的草稿方式 - #4805

Merged
adibarra merged 3 commits into
mainfrom
fix/spec-label-matches-recipe
Nov 4, 2026
Merged

adibarra merged 3 commits into
mainfrom
fix/spec-label-matches-recipe

Conversation

@adibarra

@adibarra adibarra commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The spec-decoding label on a benchmark point comes from the matrix, not from what the server runs, and two gaps let a sweep publish points as speculative when the server never drafted:

This PR:

  • makes SPEC_DECODING launcher-owned on single-node fragments, so a recipe that sets it is rejected like any other bound key;
  • reads single-node speculation only from the recipe's speculative config;
  • adds bind_speculation to multi-node binding: the label must be none exactly when the generation worker (decode, else agg) has no speculative config;
  • records what the generation worker drafts with: the binder writes SPEC_ALGORITHM (the golden AL identity method, e.g. dspark, dflash, eagle3, mtp) and SPEC_DRAFT_MODEL (the drafter repo, or native when the checkpoint drafts for itself), and AgentX results carry them as spec_algorithm and spec_draft_model (fixed-sequence results are built on the runner, outside the bound recipe, and do not). The matrix label alone cannot say this: draft_model covers both Muse Spark's separate DFlash drafter and DSV4.1-Flash's built-in DSpark on ATOM, which is labeled mtp elsewhere.

No current config changes, and no recipe fingerprint changes (both keys are excluded from the fingerprint, since they derive from the hashed roles): infx.matrix.changed reports 0 of 152 config keys changed, and every srt row of the current agentic and fixed-sequence matrices (1,388) still binds. Run against the pre-retirement Kimi-K3 B300 recipe, the old recipe is rejected for setting SPEC_DECODING; with those keys removed, c1 to c16 bind and c24 to c70 fail with SPEC_DECODING: recipe/matrix 'none' != 'mtp'.

Two launch-driver tests labeled non-drafting fixture recipes mtp; they now use none.

AI model disclosure
  • Model/version: anthropic/claude-opus-5-5
  • Role: traced the mislabeled points to the recipe check, wrote the change and tests, and ran the validation above.
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, an authorized maintainer (OWNER/MEMBER/COLLABORATOR) 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.
中文

基准点位的投机解码标签来自矩阵,而不是服务端实际运行的配置。以下两处缺口会让扫描在服务端从未进行草稿生成时,仍把点位发布为投机解码:

本 PR:

  • 将单节点片段中的 SPEC_DECODING 改为由启动器负责,设置该键的配方会像其他绑定键一样被拒绝;
  • 单节点的投机解码状态只从配方的投机解码配置读取;
  • 在多节点绑定中新增 bind_speculation:当且仅当生成 worker(decode,否则为 agg)没有投机解码配置时,标签必须为 none;
  • 记录生成 worker 实际使用的草稿方式:绑定器写入 SPEC_ALGORITHM(黄金 AL identity 中的方法名,如 dspark、dflash、eagle3、mtp)与 SPEC_DRAFT_MODEL(草稿模型仓库;若由服务的检查点自身生成草稿则为 native),AgentX 结果以 spec_algorithm 和 spec_draft_model 字段输出(定长结果在 runner 上生成,不经过绑定的配方,因此不包含)。仅凭矩阵标签无法表达这些信息:draft_model 既包括 Muse Spark 独立的 DFlash 草稿模型,也包括 ATOM 上 DSV4.1-Flash 内置的 DSpark,而后者在其他引擎上标为 mtp。

当前配置与配方指纹均无变化(这两个键由已哈希的 roles 推导,因此从指纹中排除):infx.matrix.changed 显示 152 个配置键中 0 个变化,当前 agentic 与定长矩阵中的全部 srt 行(1,388 行)仍可正常绑定。用退役前的 Kimi-K3 B300 配方验证时,旧配方因设置 SPEC_DECODING 被拒绝;去掉这些键后,c1 至 c16 可正常绑定,c24 至 c70 报错 SPEC_DECODING: recipe/matrix 'none' != 'mtp'。

两个启动驱动测试把不生成草稿的夹具配方标为 mtp,现已改为 none。

AI 模型使用说明:anthropic/claude-opus-5-5,负责将错误标注的点位追溯到配方检查、编写改动与测试,并完成上述验证。

Single-node recipes could declare benchmark.env.SPEC_DECODING to satisfy the label check on variants that do not draft, and multi-node binding never compared the label with the decode worker. SPEC_DECODING is now launcher-owned on single-node fragments, the single-node check reads speculation only from the recipe, and multi-node binding fails when the label disagrees with the generation worker.
The launcher binds SPEC_ALGORITHM and SPEC_DRAFT_MODEL from the generation worker's speculative config, in the golden AL identity vocabulary (native when the checkpoint drafts for itself). Agentic and fixed-sequence results carry them as spec_algorithm and spec_draft_model. Recipe fingerprints exclude both, since they derive from the hashed roles.
@adibarra adibarra changed the title Reject spec-decoding labels the recipe does not run / 拒绝与配方实际运行不符的投机解码标签 Check spec-decoding labels and record what each point drafts with / 校验投机解码标签并记录各点位实际的草稿方式 Nov 4, 2026
@adibarra
adibarra marked this pull request as ready for review November 4, 2026 22:29
@adibarra
adibarra requested a review from a team November 4, 2026 22:29
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

inferencex-e2e/infx diff: +95 -7

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 Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @adibarra's task in 1m 2s —— View job


Review

  • Read the diff and the call paths for binding and results
  • Checked whether a perf-changelog entry is needed
  • Posted inline feedback

🟡 One issue, inline at infx/results/fixed_sequence.py:67: fixed-sequence results will never include spec_algorithm / spec_draft_model.

  • The binder writes SPEC_ALGORITHM and SPEC_DRAFT_MODEL only into the recipe's benchmark.env, which reaches the client inside the Slurm job.
  • infx.results.fixed_sequence runs afterwards in the GHA "Process result" step and reads os.environ, where these keys are never set.
  • So the new fields reach agentic results only, not fixed-sequence ones, which doesn't match what the PR description says.

The rest of the PR looks correct:

  • Single-node: making SPEC_DECODING launcher-owned and reading speculation only from the recipe's speculative config closes the gap.
  • Multi-node: bind_speculation correctly picks the generation worker (decode, else agg).
  • Fingerprint: excluding both keys keeps fingerprints stable.

Perf changelog: the PR reports infx.matrix.changed lists 0 changed config keys. The launcher changes only reject mismatched labels and add client env, so no entry is needed.

I didn't run the tests: running pytest needs approval in this environment.

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

Findings marked 🟡 are optional suggestions and need no follow-up push.

Fixed-sequence results are built on the runner, which never sees the bound SPEC_* values, so they no longer claim to carry them. A missing MODEL_PREFIX now fails binding instead of normalizing MiniMax-M3 EAGLE as MTP.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant