Add measured collective profile gate for Qwen235

This commit is contained in:
2026-07-19 16:45:35 +08:00
parent f4a75aa8e4
commit 506e63a633
13 changed files with 1002 additions and 45 deletions

View File

@@ -0,0 +1,64 @@
# 实验 EXP-SIMFID-Q235-CC-TP8真实 TP4/TP8 collective profile 消融
> **状态:** review 通过,执行中
>
> 本 card 是 SHA、command、config、log 等 provenance 的唯一归宿;本轮只重跑 simulator不重跑已经冻结的 48 个真机 trial。
## Claim 与决策
- **Parent claim** Qwen235 Fixed-PD 的 30%+ TPOT/E2E selection regret是否主要由 TP8 collective profile 缺失及 TP4 profile 与真实 serving backend 不匹配造成。
- **目的:** 支持或反驳 mechanism hypothesis不是用同一 workload 的 E2E calibration 修正 simulator。
- **Competing hypotheses**
- H1collective profile coverage/backend mismatch 是排序反转的必要主因。换成与真机 serving 一致的 TP4/TP8 实测 profile 后Frontier 的 Fixed-PD TPOT winner 从 TP8 翻到 TP4mean/p90 TPOT 与 E2E selection regret 降到 10% 以内。
- H2collective mismatch 只解释部分误差。换 profile 后 TP8 仍是 Frontier winnerFixed-PD TPOT/E2E regret 仍超过 10%;下一主因应定位 decode batch/state-conditioned MoE composition。
- **事前预测:** 当前 Frontier 在 Fixed-PD 上预测 TP4/TP8 mean TPOT 为 87.77/61.59 msTP8 有 26.19 ms 优势;真实 TP4/TP8 为 21.04/27.99 ms。若新的 TP4/TP8 collective profile 使这个 26.19 ms 的 simulator margin 反转,则支持 H1若不能则支持 H2。
- **判定规则:** 只以 frozen simulator rerun 的 winner 与真实 frozen surface 计算 selection regret。绝对 latency ratio 作为 secondary metric不用它替代 selection verdict。
## Setup
- **自变量:**
- A0当前 `measured-allreduce.csv`TP4 是 Qwen30 hidden=2048 的旧实测,且 profiler 只检查 FlashInfer 可用、没有证明每个 payload 的实际 dispatchTP8 无行并静默 analytical fallback。
- A1Qwen235 serving-matched piecewise collective profileTP4/TP8 都在 dash0 H20、vLLM 0.20.0 commit `88d34c640...` 上实测。Frozen server logs 证明真机同时使用 `disable_custom_all_reduce=true` 与 FlashInfer-TRTLLM `allreduce_rms` fusionprofile 对 fusion-eligible payload 测同一 FlashInfer communicator对阈值外 payload 测真实 PyNCCL/symmetric fallback。
- **控制变量:** Frontier commit、Qwen235 operator profiles、runtime contract、四类 frozen traces、候选配置、MNS/MBT、prefix policy、real results 与分析脚本全部不变。
- **System context** Qwen3-235B-A22B-FP8vLLM 0.20.0+cu129dash0 8×H20`{TP4/EP1, TP8/EP8} × MNS{64,128}`MBT=8192Frontier piecewise graph path。
- **Workload 或 trace** 重跑四类 simulator surfaceFixed-PD 4096→256 @ 0.2 req/s/GPU、Fixed-PO 4096→1、Trace-PD、Trace-PO每 cell 沿用原 129-request trace。Fixed-PD 是 primary另外三类检查 profile 替换是否引入新的 selection regression。
- **Profile protocol** payload 覆盖所有 Qwen235 decode graph buckets1--256含真实 capture sizes、fusion 阈值两侧 `{63,64,65}` / `{255,256,257}`,以及 512--8192 prefill sizes每个 TP 与 payload 先 warmup再保留 3×20 个 per-rank CUDA-event samples。raw JSON 记录实际 backend dispatch、fusion byte limit、world size、dtype、payload bytes、GPU/runtime/commit 与 source hashes。TP4/TP8 使用相同 payload grid不把 microbenchmark 直接当作 E2E 结论。
- **Profile contract** H20/SM90 上 vLLM 0.20 的 fusion limit 是 TP4 2 MiB、TP8 0.5 MiB即 Q235 BF16 hidden=4096 时分别为 256/64 tokens。simulator runner 启动前解析 CSV要求所选 configs 的每个 `TP>1` 都有有限、正值的 measured rows缺覆盖立即失败。结果 manifest 写入 CSV SHA-256、TP coverage、row counts 与 piecewise backend 集合。决策实验禁止 analytical fallback。
- **Baselines** A0 current Frontier、A1 measured-profile Frontier、frozen real hardware surface。
- **Metrics** profile latency median/p90 与跨 rank spreadsimulated mean/p90 TTFT/TPOT/E2Ewinner、selection regret、tau-b可定义时每个 TP 的 measured-profile hit/fallback counters。
## 预期产物与 review
- **预期数据:** TP4/TP8 raw collective JSONmaterialized Frontier CSV + manifest四类 A1 simulator surfaceA0/A1/real comparison JSON/Markdownprofile cost ledger。
- **Figure prototype** `../../runs/frontier-fidelity-envelope-v1/qwen235-collective-ablation-mock.png`;左图固定真实与 A0 TPOT并为 A1 留待测 series右图明确“winner flip→0% regret / unchanged→33% regret”的判定。它回答 profile 修复是否足以改变配置选择。
- **人工 review** 通过2026-07-19用户明确要求“推进实验”
- **Review 意见:** 保留 frozen real surface只补真实 TP4/TP8 profile 后重跑 simulator每个 simulator 实验必须使用真实 profile缺失 coverage 或运行时 analytical fallback 立即失败。
## Benchmark design auditexperiment-design-review
| Crime | Verdict | Severity | Evidence | Fix / gate |
|---|---|---|---|---|
| 用 microbenchmark 代替 E2E | PASS | — | collective profile 只作为自变量;结论来自完整 simulator surface 对 frozen real surface 的 selection regret | 保留 A0/A1/real 三方结果 |
| calibration set 等于 evaluation set | PASS | — | A1 只测 collective operator不使用 real E2E latency 拟合参数 | 禁止 E2E scale/calibration |
| selective benchmarking | PASS | — | primary Fixed-PD 外,同时重跑另外三类 workload | 报告所有 16 个 simulator cells |
| 缺失平台/版本 | PASS | — | raw/manifest 绑定 H20、vLLM commit、model、backend 与 hashes | 任一 provenance 缺失则 profile 不可采纳 |
| 缺失方差 | NEEDS EVIDENCE | Major | 尚未执行 profile repeats | raw artifact 必须保留 per-rank repeated samples并报告 spread |
| profile 覆盖静默降级 | FAILA0 | Blocking | TP8 无 measured rowsFrontier 使用 analytical fallback | A1 runner fail-fastfallback count 必须为 0 |
| backend/fusion 阈值未对齐 | FAILA0 | Blocking | 真机日志启用 FlashInfer `allreduce_rms`vLLM 源码规定 H20 TP4/TP8 fusion limit 为 2/0.5 MiB旧 CSV 未记录这条 piecewise contract | A1 在阈值两侧实测并记录每行 dispatch |
**总体建议:** 已批准执行coverage gate、backend match 与 provenance gate 任一不通过则 Block。
## 复现信息
- **Code** AITuner branch `feature/sim`;本 card 创建时 HEAD `f4a75aa8e400ead4eb6d305178192e85940c6de6`,后续运行 commit 待填。vLLM source commit `88d34c6409e9fb3c7b8ca0c04756f061d2099eb1`
- **Environment** dash0 8×H20`/tmp/wjh/venvs/vllm-0.20.0-cu129-profiler-v1`model `/home/admin/cpfs/wjh/models/Qwen/Qwen3-235B-A22B-FP8`
- **产物路径:** 待 review 后冻结;不得覆盖旧 campaign `/home/admin/cpfs/wjh/aituner/qwen235-v020-fourcase-20260719-r1`
- **已知 deviation** `--disable-custom-all-reduce` 只关闭 vLLM custom AR不关闭编译器的 FlashInfer `allreduce_rms` fusion。真机 TP4/TP8 日志都显示自动选择 `trtllm` workspace旧 TP4 profiler 没有记录/执行真实 fusion-limit piecewise dispatch。A1 因此必须同时重测 TP4 与 TP8不能只追加 TP8 行。
## 结果
- **观察事实:** 待运行。
- **异常:** 待运行。
- **含义:** 待运行。
- **Claim update** unchanged
- **下一步:** 依次完成 collective profiling、profile materialization、CPU simulator rerun 与 analysis。