Files
aituner/.research/experiments/qwen235-tp8-collective-profile-ablation-20260719.md

7.7 KiB
Raw Blame History

实验 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:
    • H1:collective profile coverage/backend mismatch 是排序反转的必要主因。换成与真机 serving 一致的 TP4/TP8 实测 profile 后,Frontier 的 Fixed-PD TPOT winner 从 TP8 翻到 TP4,mean/p90 TPOT 与 E2E selection regret 降到 10% 以内。
    • H2:collective mismatch 只解释部分误差。换 profile 后 TP8 仍是 Frontier winner,Fixed-PD TPOT/E2E regret 仍超过 10%;下一主因应定位 decode batch/state-conditioned MoE composition。
  • 事前预测: 当前 Frontier 在 Fixed-PD 上预测 TP4/TP8 mean TPOT 为 87.77/61.59 ms,TP8 有 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 的实际 dispatch;TP8 无行并静默 analytical fallback。
    • A1:Qwen235 serving-matched piecewise collective profile;TP4/TP8 都在 dash0 H20、vLLM 0.20.0 commit 88d34c640... 上实测。Frozen server logs 证明真机同时使用 disable_custom_all_reduce=true 与 FlashInfer-TRTLLM allreduce_rms fusion;profile 对 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-FP8;vLLM 0.20.0+cu129;dash0 8×H20;{TP4/EP1, TP8/EP8} × MNS{64,128};MBT=8192;Frontier piecewise graph path。
  • Workload 或 trace: 重跑四类 simulator surface:Fixed-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 buckets(1--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 spread;simulated mean/p90 TTFT/TPOT/E2E;winner、selection regret、tau-b(可定义时);每个 TP 的 measured-profile hit/fallback counters。

预期产物与 review

  • 预期数据: TP4/TP8 raw collective JSON;materialized Frontier CSV + manifest;四类 A1 simulator surface;A0/A1/real comparison JSON/Markdown;profile 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 audit(experiment-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 覆盖静默降级 FAIL(A0) Blocking TP8 无 measured rows,Frontier 使用 analytical fallback A1 runner fail-fast;fallback count 必须为 0
backend/fusion 阈值未对齐 FAIL(A0) 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 行。
  • 执行异常: 首次 simulator launch 误把 frozen operator profile root 写成 r1;原 A0 campaign 实际使用 r2。四个 Fixed-PD cells 因缺少 attn_decode_in_mixed predictor 均 fail-fast,未产生可用 metric。command diff 确认后停止后续运行,恢复 r2 并从 failed cells 重新执行;这些失败不计入 A1 surface。

结果

  • 观察事实: 待运行。
  • 异常: 待运行。
  • 含义: 待运行。
  • Claim update: unchanged
  • 下一步: 依次完成 collective profiling、profile materialization、CPU simulator rerun 与 analysis。