← Back to Pull requests

Standardize golden AL curve names and selection / 规范黄金 AL 曲线命名与选择 #4661

Closed
unknown closed this pull request without merging on Nov 04, 2026 19:39 UTC
View on GitHub
unknown unknown commented on Oct 29, 2026 20:33 UTC
Author

[by Claude Code]

Cleanup of the golden AL curves: one naming scheme, one identity per curve, and curve selection driven by that identity instead of per-model special cases. Every current agentic config selects the same curve and the same golden AL as before.

Naming. Curve files are <model>__<method>__<draft>__<draft_sample>-<verify>.yaml, derived from the identity (default for a setting the collector did not set). A test checks every file name against its identity. For example, kimik3_dspark_probabilistic_sample_method_block_rejection_sample_method.yaml → kimi-k3__dspark__kimi-k3-dspark__probabilistic-block.yaml, and qwen3.5_mtp.yaml → qwen3.5-397b-a17b-nvfp4__mtp__native__default-default.yaml. References in the master configs, recipes, collectors, the sign-off prompt, speedbench-al.yml and the docs are updated. perf-changelog.yaml is left as history.

Selection (golden_al_distribution/identities.yaml, identity.py). Each curve has a select block: model_prefixes, method, and draft_family (MiniMax-M3 GQA) or draft_sample (Kimi K3 DSpark) only where one model's curves differ by them. curve_name returns the one matching curve and fails when none or several match. The non-obvious rules are now explicit and tested:

  • SGLang EAGLE/NEXTN → the model's native mtp curve; MiniMax-M3 EAGLE → eagle3.

  • dsv4, dsv4dspark and dsv4dsparkprob share the DSV4-0813 DSpark curve.

  • Kimi DSpark still requires an explicit greedy or probabilistic sampler.
  • Audit (srt_slurm/spec_identity.py). Each curve's collection block records engine, draft, draft_sample, verify, adaptive, topology, draft_precision, draft_kv_cache_dtype and the target's kv_cache_dtype, each as {value, source} with source explicit, documented, assumed, default or unknown. A run's generation role is described the same way and compared with its curve; the audit never changes the selection.

  • ATOM's verifier is unknown, so it is reported as unverified, never as a pass.

  • ATOM DSpark's probabilistic drafting is assumed.

  • Block, relaxed and adaptive verification are opt-in flags, so unset means standard and not adaptive (documented).

  • A recipe's synthetic sampler becomes block on real runs (documented).

  • KV cache dtypes are normalized (fp8_e4m3 = fp8, bfloat16 = bf16, auto = engine default).
  • Parity.

  • The existing curve_name tests keep their expected curves (renamed), including the Kimi sampler and MiniMax GQA cases.

  • Running python -m infx.srt_slurm.spec_identity snapshot over the agentic matrix of the NVIDIA and AMD master configs (1,453 spec-decode rows) gives the same curve and golden AL for every row before and after this change. This is a one-off check, not a committed fixture.

  • infx.matrix.changed reports 0 config keys changed.
  • Findings in today's matrix (rows):

    | Finding | Rows |
    | --- | --- |
    | verify mismatch: Kimi K3 DSpark without block (33), MiniMax-M3 with block (17), DSV4-0813 with block (13), DSV4.1 Flash without block (83), Muse Spark SGLang with block (26) | 172 |
    | target kv_cache_dtype mismatch: MiniMax-M3.1-Flash vLLM fp8 vs collected nvfp4 (19), GLM-5.2 SGLang bf16 vs fp8 (7), GLM-5.3 TileRT bf16 vs fp8 (1) | 27 |
    | adaptive (no fixed-k curve applies) | 16 |
    | unverified verify / adaptive (ATOM, TileRT) | 88 / 88 |
    | unverified draft sampler / draft precision / draft KV dtype / target KV dtype (engine default or unknown on either side) | 781 / 930 / 901 / 594 |
    | provisional curve (GLM-5.3) | 11 |
    | run engine differs from collection engine | 819 |

    Follow-ups: collect the curves the mismatches need (Kimi K3 probabilistic without block, MiniMax-M3 EAGLE3 GQA with block, DSV4-0813 DSpark with block, GLM-5.3), or align those recipes with their curve's collection.

    <details><summary>中文</summary>

    [by Claude Code]

    清理黄金 AL 曲线:统一命名方式,每条曲线一个身份描述,曲线选择由身份驱动,而不再依赖逐模型的特殊处理。所有现有 agentic 配置选择的曲线和黄金 AL 与之前完全相同。

    命名。 曲线文件命名为 <model>__<method>__<draft>__<draft_sample>-<verify>.yaml,由身份推导(收集脚本未设置的项为 default),测试会逐一校验文件名与身份是否一致。例如 kimik3_dspark_probabilistic_sample_method_block_rejection_sample_method.yaml → kimi-k3__dspark__kimi-k3-dspark__probabilistic-block.yaml。master 配置、配方、收集脚本、签核提示、speedbench-al.yml 和文档中的引用均已更新;perf-changelog.yaml 作为历史保持不变。

    选择(golden_al_distribution/identities.yaml、identity.py)。每条曲线有一个 select 块:model_prefixes、method,以及仅在同一模型的曲线因其而不同时才设置的 draft_family(MiniMax-M3 GQA)或 draft_sample(Kimi K3 DSpark)。curve_name 返回唯一匹配的曲线,没有或有多条匹配时报错。不明显的规则均已显式化并有测试:

  • SGLang EAGLE/NEXTN → 模型原生 mtp 曲线;MiniMax-M3 EAGLE → eagle3。

  • dsv4、dsv4dspark、dsv4dsparkprob 共用 DSV4-0813 DSpark 曲线。

  • Kimi DSpark 仍要求显式的 greedy 或 probabilistic。
  • 审计(srt_slurm/spec_identity.py)。每条曲线的 collection 块记录 engine、draft、draft_sample、verify、adaptive、topology、draft_precision、draft_kv_cache_dtype 和目标模型的 kv_cache_dtype,每项为 {value, source},source 为 explicit、documented、assumed、default 或 unknown。运行的生成角色以同样方式描述并与其曲线比较;审计不会改变选择结果。

  • ATOM 的验证器为 unknown,报告为 unverified,绝不视为通过。

  • ATOM DSpark 的 probabilistic 草稿为 assumed。

  • block、relaxed 和 adaptive 验证均为显式开启的选项,未设置即为 standard 且非自适应(documented)。

  • 配方中的 synthetic 采样器在真实运行中变为 block(documented)。

  • KV cache dtype 会做归一化(fp8_e4m3 = fp8,bfloat16 = bf16,auto = 引擎默认值)。
  • 一致性。

  • 现有的 curve_name 测试保留其预期曲线(已更名),包括 Kimi 采样器和 MiniMax GQA 的情况。

  • 对 NVIDIA 与 AMD master 配置的 agentic 矩阵(1,453 行推测解码配置)运行 python -m infx.srt_slurm.spec_identity snapshot,改动前后每一行的曲线和黄金 AL 均相同。这是一次性检查,不提交为固定数据。

  • infx.matrix.changed 报告 0 个配置键变化。
  • 后续工作:为上述不一致收集所需曲线(Kimi K3 probabilistic 无 block、MiniMax-M3 EAGLE3 GQA 使用 block、DSV4-0813 DSpark 使用 block、GLM-5.3),或将这些配方与曲线的收集方式对齐。

    </details>

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: Ankur-singh Review duration: 8586m
    All Vouch review confidence checks passed
    Residual risk 0.23 = Change Risk (0.57) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.57 · 650 lines diff across 8 files
    0.57
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #4661"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 57% (MEDIUM) · Higher = larger blast radius
    57%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 22.5% · Safe to merge
    22.5%