Evaluate Qwen30 prefill simulator fidelity

This commit is contained in:
2026-07-17 03:11:45 +08:00
parent 97c2f34700
commit 3a59d5df96
20 changed files with 8280 additions and 28 deletions

View File

@@ -1,6 +1,6 @@
# Frontier simulator fidelity以 config ranking 为目标的阶段性评测
更新日期2026-07-16
更新日期2026-07-17
统一实验平台:所有新增与重跑实验只使用 `dash0` 的 8×NVIDIA H20。Qwen30B 的真实 P1 artifacts 也来自 `dash0`;早期文档中的主机 provenance 标注错误,本版已按实验主机和远端 artifact 路径更正。
@@ -14,11 +14,12 @@
- 将 operator profile 更新为与真实 serving 一致的 community vLLM `0.20.0`、BF16、H20、TP1/2/4 栈后,新的 profile-only Frontier **没有恢复排序**92 个真实 anchors 在 simulator 中全部 SLO-infeasible12 个 config 因而全部并列,最坏 tie-break regret 为 `60.91%`。这否证了“旧 profile 版本不一致是主要原因”这一简单解释,并把问题收敛到 execution context、operator composition 与 mixed-state schema。
- 在 Qwen3-235B-A22B-FP8 prefill-only 上,补齐 FP8/MoE profile 与 serving semantics、但不做端到端 action calibration 后Frontier 的最优集合与真机完全一致Spearman ρ`0.9487`20/20 个可比较非 tie config pair 同序,选择 regret 为 `0`
- 在 Qwen3-235B-A22B-FP8 fixed-shape mixed 上Frontier 同样给出了与真机完全相同的 TP4 top setKendall τ-b=`0.8944`、worst tie-break regret=`0`。但这次成功掩盖了一个明确的机制错误Frontier 认为同一 TP family 内四个 MNS/MBT config 完全等价,真机 TP8 capacity 却形成对角为 0.30、非对角为 0.20 req/s/GPU 的 checkerboard interaction。34 个 config-load labels 中有 10 个 false-infeasible20 个 real non-tie pairs 中只保持 16 个方向。
- 现有结果表明:**在已对齐的受控 case 中,绝对 capacity 有 gap、甚至 action differential 错误,都不必然妨碍 Frontier 找到当前 surface 的最优 config。** 统一 dash0 campaign 已完整覆盖 Qwen235 FP8 prefill-only 与 fixed-shape mixed但仍不能外推到 trace-faithful mixed 或 decode-only也不能忽略达到这种 fidelity 所需的真机 profile、KV capacity、runtime-semantic patch 或 calibration 成本
- 新增的 Qwen3-30B-A3B BF16 prefill-only 对照在没有 decode、prefix reuse 和 true-mixed attention 的情况下仍然失败:真机 top set 是四个 TP4 configFrontier top set 却是全部 TP1/TP2 configtop set 无交集worst regret=`12.5%`、Kendall τ-b=`-1.0`32 个 real non-tie pairs 全部反向。这直接否证了“prefill-only 是 simulator ranking 充分容易条件”
- 现有结果更支持一个 **margin-aware fidelity** 解释action-differential residual 可以很大,但只有当它足以穿过 real decision margin 时才会导致选错。Qwen235 mixed 中真机 TP4 相对最好 TP8 的 margin 是 `2×`,足以掩盖同 TP family 内的机制错误Qwen30 prefill-only 中 TP scaling 差分更细Frontier 的 residual 直接反转了 topology ordering。模型大小或 execution phase 单独都不足以解释现有结果。
因此,现阶段最准确的 research statement 不是“simulator 排序一定错误”,而是:
> Simulator 的 usefulness 取决于 compatibility envelope。问题是需要多少、什么类型的真机信息才能使其 config ranking 可被信任;以及当 workload、runtime 或 execution topology 变化时,如何低成本判断该 envelope 是否仍成立
> Simulator 的 usefulness 取决于 action-differential residual 是否小于真实 decision margin。问题不是简单区分 prefill 与 mixed而是定位哪些 scheduler-state-conditioned execution residual 会随 TP、batch composition 和负载被放大,并用最少的真机信息判断 ranking 是否足够可信
## 评测口径
@@ -89,6 +90,22 @@ Frontier 原生 profile schema 可以按 `num_tensor_parallel_workers` 选择 TP
该 case 是有意设计的 prefill mechanism-isolation workloadoutput 固定为 1prefix cache 关闭,并使用固定 64-request cohort。它不保持原 trace 的 output-length distribution 和 prefix reuse因此不能被称为 trace-faithful workload也不能代表 mixed serving。
### Case DQwen3-30B-A3B BF16 prefill-only
| 项目 | 设置 |
|---|---|
| 真机 | `dash0`8×NVIDIA H20每个 job 按 TP 独占 GPU |
| model/runtime | `Qwen/Qwen3-30B-A3B`community vLLM `0.20.0+cu129`source `88d34c6409e9fb3c7b8ca0c04756f061d2099eb1`BF16 weights/activation/KVFA3runtime 默认 CUDA graph |
| workload | 64 个不同 token-chain promptsISL=2,048、OSL=1、uniform open-loop QPS、prefix cache off |
| config surface | `TP∈{1,2,4} × MNS∈{8,16,32,64}`MBT=8,192chunked prefill on共 12 cells |
| simulator | Frontier commit `d9cfeb6d8791fbf2f295dd9744c56a666171776e` + 当前 compatibility patches + vLLM 0.20 same-stack `profile-v2`;无 E2E calibration、decode graph=`none`、analytical collective |
| load lattice | base system rates `{4,8,16,32,64}` req/s事先声明的 common refinement 为 `{5,6,7}` req/s/GPU |
| real anchor | 每个 `(config,rate,round)` fresh server两轮独立运行且第二轮反转顺序两轮都 pass 才算 feasible |
| SLO | 至少 61/64 requests 满足 TTFT≤1,256 ms |
| primary objective | 最大被测试可行 offered req/s / 实际 TP GPUs |
这个 case 是对“prefill-only 是 simulator 的容易区间”的直接可证伪测试。它刻意去掉 decode、true-mixed batch、prefix reuse 和 KV-residency feedback但保留 TP 改变下的 local shard、collective、batching 与 scheduler queue。Frontier surface 在查看真机 ranking 前冻结,没有使用本 surface 的 serving latency 拟合 scale。
## Workload fidelity 修正
`thinking_w20260327_1000` 的 600 秒原始窗口包含 15,479 requests字段包括 exact prompt、arrival、`input_length`、`output_length`、session parent/turn 和 block-size=64 的 `hash_ids`。只读审计得到:
@@ -126,10 +143,11 @@ trace 的 source hash block size 为 64而 community vLLM 0.10.2 的 CUDA KV
| Qwen30 mixed / old profile-only | 12 | TP2,MNS32 | TP4,MNS32/64 | miss | τ-b=0.000exact sign=37.88% | 25.63% | 排序错误 |
| Qwen30 mixed / vLLM 0.20 profile-only | 12 | TP2,MNS32 | 全部 12 configs | 不可辨识 | τ-b=0.000exact sign=7.58% | 60.91% | 同栈 raw profile 仍不足 |
| Qwen30 mixed / frozen per-TP calibration | 12 | TP2,MNS32 | TP2,MNS32/64 | hit非 exact | τ-b=0.9668exact sign=93.94% | 0.76% | dash0 |
| Qwen30 BF16 prefill-only / vLLM 0.20 profile-only | 12 | 全部 TP4 configs | 全部 TP1/TP2 configs | miss无交集 | τ-b=-1.0000real non-tie=0/32 | 12.50% | topology order 反转 |
| Qwen235 FP8 prefill / best-effort | 8 | TP4,MBT16K,MNS64/128 | 与 real 完全相同 | exact match | ρ=0.9487non-tied 20/20 | 0 | 足以选最优 config |
| Qwen235 FP8 fixed-shape mixed / frozen full profile | 8 | 四个 TP4 configs | 与 real 完全相同 | exact match | τ-b=0.8944exact sign=24/28real non-tie=16/20 | 0 | 选对 topology漏掉 TP8 MNS×MBT interaction |
最重要的区别是Qwen30 的 high-fidelity 结果依赖 per-TP E2E calibrationQwen235 的 high-fidelity 结果不依赖本 case 的 E2E calibration但依赖同 runtime/hardware 的 operator profile、真实 KV capacity 和多处 compatibility fixes。二者都不能表述为“拿 stock Frontier 零成本预测即可”。
最重要的区别是Qwen30 的 high-fidelity mixed 结果依赖 per-TP E2E calibration,而新 prefill-only profile-only 实验证明“去掉 decode/mixed 状态”也不足以恢复 ranking。Qwen235 的 high-fidelity 结果不依赖本 case 的 E2E calibration但依赖同 runtime/hardware 的 operator profile、真实 KV capacity 和多处 compatibility fixes。两个 model 的 stack 和精度不同,所以不能把差异直接归因为 model size二者都不能表述为“拿 stock Frontier 零成本预测即可”。
## Case A baseline 结果Qwen30 mixed serving
@@ -311,6 +329,53 @@ MNS 128 fail pass
原预注册的 TPOT 40 ms 因最低负载已不可行而失去 capacity-ranking 可辨识性;本文已把 150 ms 明确记录为 post-pilot protocol amendment并保留 40 ms 全部失败的 sensitivity 结果,没有把 SLO change 隐藏成预注册结论。
## Case D 结果Qwen30 BF16 prefill-only
![Qwen3-30B BF16 prefill-only simulator-vs-real config ranking](docs/assets/simulator-fidelity/qwen30-prefill-ranking.png)
结果不是“绝对 capacity 有偏差但 rank 可用”,而是完整的 topology ordering reversal
| TP | MNS | Real | Frontier profile-only | 差异 |
|---:|---|---:|---:|---:|
| 1 | 8/16/32/64 | 7.0 | **8.0** | +1.0 |
| 2 | 8/16/32/64 | 7.0 | **8.0** | +1.0 |
| 4 | 8/16/32/64 | **8.0** | 6.0 | -2.0 |
单位为最大被测试 SLO-feasible req/s/GPU。四个 TP4 configs 是真机 top setFrontier 却把全部八个 TP1/TP2 configs 判为 top set两者无交集。部署任一 simulator top config 都只能在真机上得到 7 req/s/GPU因此 optimistic 与 worst tie-break regret 都为 `1-7/8=12.5%`。Kendall τ-b=`-1.0`32 个 real non-tie pairs 中 0 个同序。96 个 config-load decisions 中 80 个一致,但同时有 8 个 false-feasible 和 8 个 false-infeasible它们刚好跨过了不同 TP family 的 capacity boundary。
### 错误从哪里开始放大
代表性 `MNS=8` anchors 表明,低负载单次 execution time 并没有数倍偏差,错误主要在接近饱和时被 queue 放大:
| Config / system rate | Real TTFT p95两轮 | Frontier TTFT p95 | Real / sim SLO |
|---|---:|---:|---|
| TP1 @ 4 req/s | 154.1 / 153.6 ms | 171.6 ms | pass / pass |
| TP1 @ 8 req/s | 1289.2 / 1254.4 ms | 516.4 ms | fail / pass |
| TP2 @ 8 req/s | 97.7 / 93.8 ms | 122.2 ms | pass / pass |
| TP2 @ 16 req/s | 1389.9 / 1365.0 ms | 962.8 ms | fail / pass |
| TP4 @ 4 req/s | 82.3 / 69.6 ms | 93.1 ms | pass / pass |
| TP4 @ 32 req/s | 1136.6 / 1134.0 ms | 1787.9 ms | pass / fail |
这排除了“只要给所有 kernel 乘一个 global scale 就能修好”的解释:相同 stack 在低负载下接近,但在不同 TP 的饱和边界上向相反方向偏移。更符合数据的抽象是:小的 per-step composition residual 改变 service rate再通过 scheduler queue 的非线性反馈放大成 TTFT 和 capacity 边界错误。
当前证据可以排除一些原因,但还不能唯一定位根因:
1. **Decode/true-mixed schema 不是必要条件。** 这个 workload 没有 decode、FULL decode CUDA graph、fused true-mixed attention 或 initial-KV state排序仍然失败。这些机制可能在 mixed/decode 中进一步增大误差,但不是本次失败的前提。
2. **Communication 可能解释部分 TP scaling但不能单独解释全部误差。** `profile-v2/allreduce.json` 已有 24 个 TP2/TP4 实测 rows但 base Frontier 为了保持历史对照使用 analytical 600-Gbps/1-µs collective没有注入这些数据。下一步必须单独做 measured-collective ablation但 TP1 无 collective 仍在 8 req/s 出现 773 ms 的 p95 低估,所以 collective 不会是唯一根因。
3. **Profile 覆盖了 token count却未必覆盖 scheduler 实际产生的 batch composition。** linear/MoE rows 覆盖到 8,192 tokens但 exact-2,048 pure-prefill attention 在每个 TP 下只有 batch=1 的直接样本;实际 MBT=8,192 可以产生多个 2,048-token sequence 的组合。这是一个需要补测的 coverage hypothesis不是已证明根因。
4. **Routing、step composition 和 scheduler batch state 仍然是联合候选。** pure-prefill 只排除了 phase mixing没有排除 MoE routing、TP-specific local shape、launch/fusion 和持续负载下 batch/queue trajectory 的耦合。
### 为什么 235B 能选对30B 却选错
现有数据不支持“235B 大所以 simulator 更容易”这种模型大小因果。两个 case 的 precision、vLLM 版本、attention backend、graph mode、EP 和 profile closure 都不同。能被数据直接支持的区别是 **decision margin**
- 235B mixed 真机中 TP4 最优 capacity 为 0.60 req/s/GPU最好 TP8 为 0.30,有 `2×` marginFrontier 虽然漏掉 TP8 的 MNS×MBT interaction仍预测 TP4/TP8 为 0.40/0.15,所以 residual 没有穿过全局拓扑边界。
- 30B prefill-only 真机 TP4 相对 TP1/TP2 只有 8 vs. 7 req/s/GPU 的 margin。Frontier 预测为 6 vs. 8TP-dependent residual 大于真实 margin因而把最优 topology 完整反转。
因此“prefill-only 容易decode/mixed 困难”的强假设已被否证。phase 仍可能改变 residual 的幅度,但它不是 fidelity 的充分条件。按预注册 decision rule此时不应继续无区分度地扩展更多 phase cases而应在 Qwen30 同一 model/workload 上按单变量顺序做:`measured collective injection` → `batch-composition-conditioned pure-prefill attention/step profile` → 在 TP1@8、TP2@16、TP4@32 对齐 real/sim scheduler batch、queue 与 per-step critical path → 最后再测 routing/graph。
本 case 接受的 ground truth 共 24 个 fleet jobs、192 个 fresh-server anchors、12,288 个 measured requests 和 4,512 个 warmup requests消耗 12.07 H20-GPU-hours。运行中曾因 fleet controller 在 fresh-server 空窗误判 GPU 为空闲而产生重叠 launch这些 attempts 未被合并到 accepted artifact root已整体隔离并用独立 queue state 重跑。最终 comparison SHA256 为 `c9a9cac9f60c7be804d1cb9466c455f8fe9e3a8dc60b9cec3329bde6a8c19334`。
## 尚不能纳入 simulator ranking 的 case
### 原 internal-runtime Qwen235 prefill-only
@@ -328,11 +393,12 @@ MNS 128 fail pass
当前证据的结论是:
1. **绝对 gap 不是否决 simulator 的理由。** Qwen235 中 11%--50% 的 capacity 低估仍可保持 zero-regret config selection。
2. **rank 成功不能证明模型机制正确。** Qwen235 prefill 的 TP8 MBT differential 错误fixed-shape mixed 又漏掉 TP8 的 MNS×MBT 非加性交互Qwen30 还有 28/92 anchor SLO labels 错误。只是当前 decision margin 足以容忍这些 residual
3. **alignment 是结果的一部分。** Qwen30 需要 per-TP E2E calibration 才能恢复排序Qwen235 不需要本 case E2E calibration但需要同栈 FP8 profiles、真机 KV capacity 和 simulator patches。论文必须报告这部分真机成本不能把它隐藏在“offline profiles”中
4. **目前不能建立“simulator 全局选优普遍失败”的 premise。** 受控 prefill、fixed-shape mixed 和历史 mixed surface 上,经过 alignment 的 Frontier 已经能选到最优或 0.76% 内的近最优 config。更有证据的 research premise 是aggregate selection success 会掩盖 action interaction 与 state-transition model 的错误;若要声称全局选优失败,仍必须在 dash0 的 trace-faithful mixed、decode-only、prefix cache 或跨 topology case 上得到稳定反例
2. **rank 成功不能证明模型机制正确rank 失败则表明 residual 穿过了 decision margin。** Qwen235 prefill 的 TP8 MBT differential 错误fixed-shape mixed 又漏掉 TP8 的 MNS×MBT 非加性交互,但大 topology margin 保住了 top setQwen30 prefill-only 的较小 margin 被 TP-dependent saturation residual 穿过,导致 τ-b=-1 和 12.5% regret
3. **prefill-only 不是 fidelity 的充分容易条件。** Qwen30 在没有 decode、prefix reuse、initial KV 和 true-mixed batch 时仍选错 topology。phase 可以改变 residual但不能单独作为 compatibility-envelope 边界
4. **alignment 是结果的一部分。** Qwen30 mixed 需要 per-TP E2E calibration 才能恢复排序,同栈 operator profile 或去掉 mixed phase 都不足Qwen235 不需要本 case E2E calibration,但需要同栈 FP8 profiles、真机 KV capacity 和 simulator patches。论文必须报告这部分真机成本不能把它隐藏在“offline profiles”中
5. **现在有了可复现的全局选优反例,但尚不足以声称 simulator 普遍失败。** Qwen30 BF16 prefill-only 是一个无 top-set overlap 的稳定反例Qwen235 两个 case 又证明 Frontier 在某些 envelope 内足以选优。更有研究价值的 premise 是:**什么 state-conditioned action residual 决定 ranking 是否能跨过 real margin以及如何在不做全 surface 真机 sweep 的情况下检测这个风险。**
后续每个 case 建议使用同一 gateworst selected-config regret ≤5%、tie-aware rank correlation ≥0.8、足够数量的 informative pairs、ground-truth bracket 不足以反转最优决策,并单独报告达到该结果所需的 real-GPU profiling/calibration cost。
后续每个 case 建议使用同一 gateworst selected-config regret ≤5%、tie-aware rank correlation ≥0.8、足够数量的 informative pairs、ground-truth bracket 不足以反转最优决策,并单独报告达到该结果所需的 real-GPU profiling/calibration cost。当前下一 gate 是在 Qwen30 prefill-only 上做同模型单变量 context ablation而不是继续扩展跨模型 phase 矩阵。
## 数据与复现
@@ -340,6 +406,10 @@ MNS 128 fail pass
- 画图脚本:[plot_simulator_fidelity.py](scripts/plot_simulator_fidelity.py)
- Qwen30 audit[report.md](runs/frontier-multicase-sufficiency-v0/results/qwen30-baseline/report.md)
- Qwen30 aligned metrics[metrics.json](runs/frontier-slo-alignment-v0/results/metrics.json)
- Qwen30 prefill-only experiment card[experiment-card.md](runs/frontier-phase-factorial-v0/experiment-card.md)
- Qwen30 prefill-only comparison[comparison.json](runs/frontier-phase-factorial-v0/results/final/comparison.json)
- Qwen30 prefill-only capacity table[capacity.csv](runs/frontier-phase-factorial-v0/results/final/capacity.csv)
- Qwen30 prefill-only analyzer[analyze_qwen30_prefill_fidelity.py](runs/frontier-phase-factorial-v0/analyze_qwen30_prefill_fidelity.py)
- Qwen235 fixed-cohort comparison[v2_refined_comparison.json](runs/frontier-multicase-sufficiency-v0/best_effort/fixed_cohort_evidence/v2_refined_comparison.json)
- Qwen235 full report[report.md](runs/frontier-multicase-sufficiency-v0/best_effort/fixed_cohort_evidence/report.md)
- Fixed-shape mixed comparison[comparison.json](runs/frontier-multicase-sufficiency-v1/results/t0-final/comparison.json)
@@ -357,4 +427,17 @@ MNS 128 fail pass
```bash
python3 scripts/plot_simulator_fidelity.py
python3 runs/frontier-phase-factorial-v0/analyze_qwen30_prefill_fidelity.py \
--fleet-artifacts runs/frontier-phase-factorial-v0/fleet-artifacts-exclusive \
--simulator-manifest runs/frontier-phase-factorial-v0/simulator-tp1/frontier_surface_frozen.json \
--simulator-manifest runs/frontier-phase-factorial-v0/simulator-tp2/frontier_surface_frozen.json \
--simulator-manifest runs/frontier-phase-factorial-v0/simulator-tp4/frontier_surface_frozen.json \
--simulator-manifest runs/frontier-phase-factorial-v0/simulator-refine-tp1/frontier_surface_frozen.json \
--simulator-manifest runs/frontier-phase-factorial-v0/simulator-refine-tp2/frontier_surface_frozen.json \
--simulator-manifest runs/frontier-phase-factorial-v0/simulator-refine-tp4/frontier_surface_frozen.json \
--output-root runs/frontier-phase-factorial-v0/results/final
cp runs/frontier-phase-factorial-v0/results/final/qwen30-prefill-ranking.png \
docs/assets/simulator-fidelity/qwen30-prefill-ranking.png
```