Skip to content

docs: canonical forbidden-optimizations list enforced by sign-off / 文档:建立禁止优化手段的权威列表并在签核中强制执行 - #4510

Closed
Oseltamivir wants to merge 2 commits into
mainfrom
docs/forbidden-optimizations
Closed

Oseltamivir wants to merge 2 commits into
mainfrom
docs/forbidden-optimizations

Conversation

@Oseltamivir

@Oseltamivir Oseltamivir commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

The rules for what a submission may not do to get faster numbers are spread across the draft-precision section of CONTRIBUTING.md, the PR review checklist, and the CI sign-off verifier prompt. There is no single list, and AGENTS.md mentions none of it, so an agent tuning a recipe only meets these rules at sign-off, after the sweep has run.

  • CONTRIBUTING.md#forbidden-optimizations (new): the canonical list, with five categories: architecture FLOP reduction, lowering draft precision (linking the existing Draft-model precision section, unchanged), engine patching and the waiver exception, gaming speculative acceptance, and accuracy-trading levers without eval coverage.
  • Sign-off verifier, new Check 8(c): reads that section from the default-branch checkout and FAILs any listed technique that Checks 8(a), 8(b), 10, 11, and 13 don't already cover, including items added later. A PR cannot narrow the list by editing it. Existing checks are unchanged.
  • AGENTS.md: one bullet pointing agents to the list before they tune a recipe, server flags, or an image.

Policy change, going forward: two levers move from "allowed with eval coverage" to forbidden:

  • Indexer skipping or sharing, including engine defaults such as SGLang's ROCm SGLANG_MINIMAX_M3_INDEX_TOPK_FREQ=2; recipes must set =1 explicitly.
  • INT4 quantized all-reduce (*QUICK_REDUCE_QUANTIZATION=INT4); INT6 and INT8 stay allowed with evals.

Both apply to configs added or changed after merge and do not invalidate earlier runs. 14 active MI355X recipes use INT4 quick-reduce and will fail sign-off when next changed (including image bumps) until it is removed. All other items already existed in the checklist, the draft-precision section, or the verifier. The PR review checklist template is untouched, so Check 5 (latest template) is unaffected.

AI model disclosure

Prepared with claude-opus-5-5 (Claude Code) for analysis and editing.

中文

禁止使用的优化手段目前分散在 CONTRIBUTING.md 的草稿模型精度章节、PR 审查清单和 CI 签核验证器提示词中,没有统一列表,AGENTS.md 也未提及,导致智能体只有在签核阶段(扫描已运行之后)才会遇到这些规则。

  • 新增 CONTRIBUTING.md#forbidden-optimizations,作为权威列表,涵盖五类:削减模型架构 FLOPs、降低草稿模型精度(链接现有章节,内容不变)、修补推理引擎及豁免例外、操纵推测解码接受长度、以及缺少评测覆盖的精度折衷手段。
  • 签核验证器新增 Check 8(c):读取默认分支上的该章节,对 Check 8(a)、8(b)、10、11、13 尚未覆盖的列表项(包括日后新增项)判定 FAIL;PR 无法通过修改列表来缩小范围。现有检查不变。
  • AGENTS.md 新增一条,提示在调整配方、服务参数或镜像前先阅读该列表。

政策变更(仅对之后新增或修改的配置生效,不影响既有结果):索引跳过/共享(包括引擎默认值,如 ROCm 上 SGLang 默认 SGLANG_MINIMAX_M3_INDEX_TOPK_FREQ=2,配方须显式设为 1)以及 INT4 量化 all-reduce 改为禁止;INT6/INT8 在有评测覆盖时仍允许。目前有 14 个 MI355X 配方使用 INT4 quick-reduce,下次修改(包括镜像升级)时将无法通过签核。其余条目均已存在于审查清单、草稿精度章节或验证器中;PR 审查清单模板未改动,因此不影响 Check 5。

…sign-off

Collect the forbidden techniques (architecture FLOP reduction, draft
precision lowering, engine patching, acceptance gaming, and unevaluated
accuracy-trading levers) in one CONTRIBUTING.md section. The sign-off
verifier's new Check 8(c) fails any listed technique not already covered
by Checks 8, 10, 11, or 13, judged against the default-branch list.
AGENTS.md points agents to it before tuning.

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

Code review found no issues

No high-confidence issues detected in this change.

Move both out of the eval-covered levers. Indexer skipping or sharing is
forbidden even when the model or pinned engine enables it by default;
recipes must disable engine-default sharing explicitly. INT4 quick-reduce
is forbidden; INT6 and INT8 stay allowed with eval coverage. Both apply to
configs added or changed from now on, without invalidating earlier runs.
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