Files
aituner/runs/frontier-qwen30-vllm020-profile-v1/experiment-card.md

59 lines
8.5 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-Q30-P020同栈 per-TP operator profile 能否恢复 Frontier ranking
> **状态:** 完成H1 rejected结果支持 H22026-07-16
## Claim 与决策
- **Parent claim** Frontier 在 Qwen3-30B-A3B 的 TP×MNS surface 上出现 25.63% selection regret原因可能不是 simulator scheduler 本身,而是 execution profile 与真实 serving stack 不一致。
- **目的:** 区分 profile provenance mismatch 与 simulator composition/schema mismatch。
- **Competing hypotheses** H1换成与真实 serving 相同的 per-TP operator profiles 后profile-only ranking 达到 regret ≤5% 且 Kendall τ-b ≥0.8H2即使 operator profile 同栈Frontier 的 operator composition 或 mixed-state abstraction 仍无法保持 ranking。
- **事前预测:** 若 H1 成立,新 profile-only top set 应从旧结果的 TP4 移到真实 top family TP2且不需要 end-to-end scalar calibration若 H2 成立operator microbench 单项可对齐,但组成后的 config rank 仍错,残差应随 phase、batch state 或 TP action 系统变化。
- **判定规则:** `P-020` profile-only regret ≤5% 且 τ-b ≥0.8 → 支持 H1否则进入 stage/action-conditioned residual 分解,禁止用本 surface 的 E2E measurement 拟合 scale。
## Setup
- **自变量:** execution profile root`P-old`(历史 profile`P-020`(本实验冻结 profile`P-cal` 历史 per-TP scalar calibration 只作上界参照。
- **控制变量:** Frontier simulator code/commit、trace fixtures、KV capacity、SLO、12-cell config surface、random seed 与 analysis code保持完全相同。
- **System context** Qwen3-30B-A3BBF16 weights/activations/KVcommunity vLLM 0.20.0dash0 8×NVIDIA H20TP∈{1,2,4}DP=PP=EP=1MBT=8192MNS∈{8,16,32,64}prefix caching、chunked prefill 与 async scheduling均启用。
- **真实 runtime contract** engine log 已确认 TP1/2/4 均为 FlashAttention 3 attention + FlashInfer CUTLASS unquantized MoETP2/4 使用 FlashInfer TRT-LLM all-reduce。旧 profile log 明确为 vLLM 0.11.1attention backend 为 FlashInfer。
- **Workload 或 trace** 历史 ground truth `chat_w20260311_1000`source 600 s window、replay time scale 0.1、input 08192、fixed output 128、prefix cache on。当前本地 recovered artifact 无法重建 exact source requests本次只替换 frozen simulator profile不重跑或改写 ground truth。
- **Baselines** old profile-onlynew `P-020` profile-onlyhistorical frozen per-TP calibrated。
- **Metrics** real/sim capacity per GPU、selected top set、worst selected-config regret、Kendall τ-b、informative-pair direction、逐 TP operator-time ratio、profile coverage/extrapolation ratio。
## 预期产物与 review
- **实际数据:** TP1/2/4 attention、KV-cache update、linear、MoE、collective raw profiles冻结 manifest/sha25692/92 new profile-only runsold/new/calibrated comparisonscheduler graph-mode 与 native MoE routing diagnostics。
- **Figure** `../../docs/assets/simulator-fidelity/qwen30-vllm020-profile-ablation.png`;四个 panels 分别展示完整 ranking、routing skew、phase-dependent graph mode 和 held-out P1 boundary accuracy。图中只使用实测或冻结分析结果。
- **人工 review** 已批准。用户明确要求推进 5 个步骤,并要求 smoke 通过后直接完整运行。
- **Review 意见:** 不能把 TPMNS 耦合拆成互不相关问题profile 只冻结 execution counterfactual 的证据,最终仍以完整 config ranking 判断。
## 复现信息
- **Code** AITuner 当前 branch `codex/fidelity-prefix-pilot-20260714`Frontier canonical commit `d9cfeb6d8791fbf2f295dd9744c56a666171776e`vLLM commit/tag `88d34c6409e9fb3c7b8ca0c04756f061d2099eb1` / `0.20.0`
- **Environment** `/tmp/wjh/venvs/vllm-0.20.0-cu129-profiler-v1`hardware/driver/package freeze 写入每个 profile artifact。
- **产物路径:** remote `/home/admin/cpfs/wjh/frontier_qwen30_vllm020_profiles/`; local harvest `runs/frontier-qwen30-vllm020-profile-v1/fleet-artifacts/`
- **已知 deviation** 历史 real ground truth 与本次 profile 都来自 dash0早期文档中的主机 provenance 标注错误。driver 从历史 570.133.20 漂移到当前 580.95.05,因此结果仍不能解释为严格的逐 kernel latency 复现,只能作为同一 H20 主机上 profile-stack alignment 的对照。
## 结果
- **Step 1—同栈固定** dash0 8×H20Qwen3-30B-A3B BF16community vLLM `0.20.0+cu129` / source commit `88d34c6409e9fb3c7b8ca0c04756f061d2099eb1`。真实 serving 与 profiles 使用同一主机和 model family历史 driver 570.133.20 到当前 580.95.05 的漂移保留为限制。
- **Step 2—per-TP profiles** profile-v2 冻结 attention 132 rows、直接测量 fused-mixed diagnostic 30 rows、linear 36 rows、MoE 72 rows、all-reduce 24 rows。attention/linear/MoE 通过单 H20 local-shard shape 表达 TPall-reduce 使用真实 TP2/4 ranks。base comparison 保持 historical analytical CC backendmeasured all-reduce 仅作独立诊断。
- **Step 3—trace execution coverage** 6 个 P1 cells 共 161,161 scheduler/model stepspure decode 151,471100% FULL graphpure prefill 224192 NONE、30 PIECEWISE、2 FULLtrue mixed 9,4668,623 NONE、842 PIECEWISE、1 FULL。exact-trace 8-request native routing probe 表明实际 median max/mean expert load 为 prefill 6.12、decode 5.64,而 Frontier fixed prior 为 1.84actual-vs-prior Pearson median 接近 0。该小 cohort 用于机制否证,不作为 routing population estimate。
- **Step 4—冻结 profile-only** profile-v1 因 true-mixed schema 缺少 `attn_decode_in_mixed` 在第一个 mixed batch fail。profile-v2 使用 same-TP pure prefill/decode ratio 做 total-conserving compatibility split同时保留直接实测 fused total。两个 46-run CPU shards 均 PASS92/92 runs 无 crash总 simulator runtime 2,394.9 s0.665 CPU-hour
- **Step 5—ranking comparison** real optimum 为 TP2/MNS32。old profile-only top set 为 TP4/MNS32/64τ-b=0、worst regret=25.63%new vLLM 0.20 profile-only 在所有 92 anchors 上都 SLO-infeasible12 configs 全并列,τ-b=0、exact pair sign=7.58%、worst tie-break regret=60.91%historical frozen per-TP calibration top set 为 TP2/MNS32/64τ-b=0.9668、worst regret=0.76%。在 held-out P1 12 boundary labels 上new profile-only accuracy 41.67%、pass-rate MAE 69.84%,也没有优于 old profile-onlycalibration 分别为 83.33% 和 11.75%。
- **Same-state delta** 在 `tp1_mns64` 的 batch 0/layer 0、profile-dependent trajectories 尚未分叉时new/old layer component sum 已为 2.70×MoE grouped GEMM 3.76×、RoPE 7.39×、attention prefill 2.67×。误差不是可由一个 version correction 解释的一致 scale。
- **异常与 schema gap** Frontier 原生 attention profiler 只实现 `FLASHINFER`/`NO_OP`,不能调用真实 serving 的 `FLASH_ATTN`;其 MoE wrapper声明并硬编码 vLLM 0.10.x API。vLLM 0.20.0 的 FA3 mixed prefill+decode 是一个 fused varlen call而 Frontier schema要求 `attn_prefill``attn_decode_in_mixed` 两项。兼容 split 是归因,不是观测。
- **Interpretation** H1 被否证。同栈 isolated operator profile 不等价于真实 execution counterfactual。TP 与 MNS 共同改变 local shape、collective、queue/batch composition、phase mixture、routing 和 CUDA graph regimestatic operator sum 在 scheduler 推进后产生 feedback amplification。历史 per-TP calibration 是 composition 之后的外部 E2E scale能吸收这些残差但不是 Frontier 原生 per-TP profiling 或机制解释。
- **Claim update** 支持 H2。新的 research target 是验证 execution-context-conditioned composition而不是继续把更多 isolated kernel rows 当作 fidelity 的充分条件。
- **下一步:** 分别做 graph-conditioned step profile、fused mixed total、trace-conditioned routing 和 measured collective 四个单变量消融,再回到完整 TP×MNS joint surface 评测frozen calibration 仅作上界,不参与 mechanism fitting。
## 产物索引
- Frozen profile`frozen/profile-v2/manifest.json`
- Full-surface comparison`artifacts/qwen30-s2-profile-ablation.json`
- P1 boundary comparison`artifacts/qwen30-p1-profile-ablation.json`
- Scheduler/graph-mode summary`artifacts/qwen30-p1b-opprof-summary.json`
- Native routing mismatch`artifacts/qwen30-routing-mismatch.json`
- Same-state operator delta`artifacts/qwen30-initial-op-trace-delta.json`
- Figure script`plot_profile_ablation.py`