Files
aituner/runs/frontier-fidelity-envelope-v1/experiment-card.md

85 lines
7.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# EXP-SIMFID-ENVELOPE-V1:Frontier best-effort fidelity envelope
> **状态:** 已批准,准备执行(2026-07-17)。用户要求先把 simulator 现有能力跑到最好,并同时覆盖 fixed input/output 与真实 trace replay。
## Claim 与可证伪假设
- **研究问题:** 在不使用被评测 config/workload 的 serving E2E calibration 时,Frontier 的 measured operator/collective profiles 与 scheduler state abstraction,是否足以找到真机上的低-regret config?
- **H-CC:** Qwen30 prefill-only 的 TP 排序错误主要来自默认 analytical all-reduce;注入同机、同 TP 的 measured collective 后,已知 `2048/1` surface 的 regret 降至不超过 5%,Kendall tau-b 升至至少 0.8。
- **H-BATCH:** 若 H-CC 不足,错误主要来自 pure-prefill attention 只有 batch=1 profile,而 Frontier 在多请求 batch 上使用没有 coverage 的 `attn_prefill_mixed` 外推;增加 MBT 可达的真实 batch composition 后可恢复排序。
- **H-STATE:** 若 measured collective 与 batch-composition profile 都不能恢复排序,则缺失量位于 isolated operators 之外的 scheduler-state-conditioned step composition;继续增加静态 kernel rows不是有效修复。
- **成功门槛:** worst selected-config regret `<=5%`、tie-aware Kendall tau-b `>=0.8`、真机 capacity bracket 不足以反转 top decision,并且没有使用同一 surface 的 E2E scalar calibration。
## Simulator ablation(先用已有 ground truth,零新增 GPU 成本)
| variant | compute profile | collective | 目的 |
|---|---|---|---|
| A0 | vLLM 0.20 frozen profile-v2 | Frontier analytical | 已冻结 baseline |
| A1 | 同 A0 | Frontier 原生 Vidur + measured TP2/TP4 CSV | 检查原生 profile consumption;大 payload fallback 保留并计数 |
| A2 | 同 A0 | measured Vidur,cache miss 直接调用已训练 estimator | 最小 correctness fix;消除 `>100k elements` 静默 analytical fallback |
| A3 | 增加 pure-prefill batch-composition rows | 同 A2 | 检验 batch-composition coverage 是否是剩余误差来源 |
A1/A2/A3 都重新运行完整 `TP∈{1,2,4} × MNS∈{8,16,32,64}` surface;TP1 无 all-reduce。所有 simulator variants 在查看新增真机 case 前冻结。A2 是单独标注、带单测的 compatibility patch,不与 Frontier upstream 原生能力混写。
## Workload matrix
| ID | workload | arrival / prefix | phase role |
|---|---|---|---|
| F0 | fixed `ISL=2048, OSL=1` | uniform QPS;distinct prefixes | 已有 real ground truth,选择 A0--A3 |
| F1 | fixed `ISL=512, OSL=1` | uniform QPS;distinct prefixes | short-prefill、多请求 batch composition |
| F2 | fixed `ISL=2048, OSL=128` | uniform QPS;distinct prefixes | true prefill+decode mixed serving |
| T1 | `thinking_w20260327_1000` eligible trace | 原 timestamp/order;exact prompt/output/session/hash;prefix on | production joint distribution 与 cache/scheduler feedback |
T1 只排除已经审计的 72 个超 40,960 context rows 和 6 个 zero-output rows,eligible universe 为 `15,401/15,479`。负载轴只使用 trace 已有、同 session 共享的 `sampling_u`;入选 request 的 arrival、input/output、prompt、hash 和相对次序不变。真实 runtime 设置 `min_tokens=max_tokens=output_length` 且 `ignore_eos=true`,逐请求核对 usage。
## 固定系统与 config surface
| 项目 | 冻结设置 |
|---|---|
| machine | 仅 `dash0`,8×NVIDIA H20 |
| model/runtime | `/home/admin/cpfs/wjh/models/Qwen/Qwen3-30B-A3B`;community vLLM 0.20.0+cu129;BF16 weight/activation/KV |
| simulator | Frontier `d9cfeb6d8791fbf2f295dd9744c56a666171776e` + manifest 中列出的现有 compatibility patches;A2 patch 独立 hash |
| configs | `TP∈{1,2,4} × MNS∈{8,16,32,64}`;DP=PP=EP=1;MBT=8192;block=16 |
| runtime | chunked prefill on;fixed cases prefix off;T1 prefix on;fresh server per `(config, load, round)` |
| score | `capacity(c)=max tested offered req/s with joint SLO pass rate >=0.95`;primary `capacity/actual TP GPUs` |
| SLO | TTFT `<=1000ms + 1000×ISL/8000`;mixed case同时要求 TPOT `<=150ms`;另报告 50/100/180ms sensitivity,不用 sensitivity 改写 primary |
F0 沿用已经冻结的 rate lattice与两个 fresh-server rounds。F1/F2 先由冻结 simulator 给出 boundary,再加入共同 per-GPU guard anchors,避免只测 simulator 预测附近而漏掉真实最优。每个 boundary anchor 两个 fresh-server rounds,二者都 pass 才算 feasible。
T1 保持原 600 秒 arrival window。先在 simulator 上冻结 `sampling_u` bracket;真机只运行 topological guard set `{TP1,TP2,TP4} × {MNS8,MNS32,MNS64}`,若 top set 或 bracket 仍可能被未测 MNS 反转再补 MNS16。每个入选 source-row vector在 real/sim 两侧必须有相同 digest;至少两个 session-hash folds,若本轮只完成一个 window则明确标为 single-window evidence。
> **Pre-bracket smoke amendment(2026-07-17,任何 T1 真机结果产生前):**
> 允许预先运行一个固定的 `TP4/MNS32 × u=0.005` real harness smoke。该点已属于上述
> guard set,选择不依赖 simulator 输出;在完整 simulator surface 冻结前,性能结果保持
> sealed,只检查进程退出状态、artifact 完整性、request usage 与 row-vector digest。该 smoke
> 不用于选择 config、移动负载 bracket 或形成 fidelity verdict;full real anchors 仍必须等待
> simulator bracket 冻结。目的仅是让 600 秒真机 harness 验证与 CPU simulator surface 并行,
> 缩短 critical path。
## 诊断与停止规则
1. A1 必须报告每次 collective prediction 的 measured-model hit 与 analytical fallback 次数;不能只看最终 rank。
2. A2 对超过 100k elements 的 payload 必须由单测证明走 estimator;A2 若不改变任何 TP2/TP4 step,立即停止并检查 CLI/config 注入,不进入 GPU。
3. A3 profile 只覆盖 MBT=8192 可达的 pure-prefill composition:F0 为 `1/2/4 × q2048`,F1 为 `1/2/4/8/16 × q512`,TP1/2/4 分别实测;不做无边界的 profile sweep。
4. 若 A3 在 F0 仍不能达到 fidelity gate,先采集 `TP1@8, TP2@16, TP4@32` 的 per-step batch/queue/component residual;禁止用 per-TP E2E scale把答案拟合正确。
5. 只有 best-effort simulator 在 F0 通过或形成可解释、可定位的失败后,才运行 F1/F2/T1 真机;任一 case 的结论不外推到其它 workload。
## 预期成本与产物
- simulator A1--A3:CPU only,约 1--3 小时总 CPU wall,0 GPU-hour。
- attention composition profile:3 张 H20 并行,预计 5--10 分钟,`<0.5 H20-GPU-hour`。
- F1/F2 real boundary:预计合计 12--24 H20-GPU-hours,smoke 后再锁定。
- T1 real boundary:600 秒原 arrival window使单 anchor较贵;预计 30--60 H20-GPU-hours,必须在 simulator bracket 和一配置 smoke 后重新 echo 精确预算。
- 产物:variant/profile manifests、full surfaces、anchor-level request metrics、rank/regret/confusion tables、profile-consumption counters,以及 fixed-vs-trace fidelity summary figure。
## Benchmark design audit
| 风险 | 处理 |
|---|---|
| selective benchmarking | 预先冻结 F0/F1/F2/T1,不因结果删除失败 case |
| calibration=evaluation | 禁止使用同一 surface 的 serving E2E scalar;microprofile GPU 成本单独报告 |
| trace filtering | 只做 context/zero-output correctness exclusion和 session-coherent thinning,不按长度筛选 |
| simulator-guided real sampling | 使用共同 guard anchors;未闭合 bracket 不能宣布 top match |
| absolute-vs-rank metric | 同时报绝对 capacity/latency、rank、regret、tau-b、pair direction和 SLO confusion |
| hidden fallback | A1/A2 强制计数 measured-model hit/fallback,并写入 frozen manifest |