96 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.

# GLM-5.3-NVFP4 PP+MTP r36去边界 GLOO修复与判决 — 2026-09-08 @174.1.60.8
接续 `glm53_nvfp4_i8k_o1k_c16_bench`A16/B 基线)与 r33 PP+MTP 深挖ppmtp_deepdive
目标:修复自研 TP4PP2+MTP 补丁并让 MTP 与 PP 双优势同时兑现;判负则 60.8 恢复 A16 在役。
## 结论速览
| 判决项 | 结果 |
|---|---|
| 去 GLOOr36 | **成立**稳定conc_test×3 + cc16 杀手×2 零崩溃、可复现 ±1%prefill 密集档 8×16384 **-22%**46.2→36.0s |
| i8k/o1024/cc16/nreq32 判决PG19 语料) | **PP+MTP 判负**e2e P50 **111.2/116.3s** vs B' 同栈对照 **61.5/61.6s**≡B 基线 61.8svs A16 66.2s**差 1.81×**,双门未过 |
| 缺口归属 | **100% 属 MTP 机制**B' 在同一 r36 栈上完美复现 B 基线栈本身零回退verify-step ~235ms@cc16 / ~148ms@cc8break-even 需 <148ms=52ms×accept2.85 |
| Phase4 图模式r36g | **正确性灾难,判死**`cuda graph: True` 生效但 accept **2.85→1.05**接受率 0.02)、GSM8K 输出数字噪声draft+verify 双坏)。**FORCE_EAGER 双开关是承重墙**非性能旋钮 |
| sanitizer 根治路线 | **不可行**320 错误全为 NCCL 探测噪声error 209真死因=memcheck 开销 ~10GB/ 吃掉 0.88 KV 余量最低可行 memfrac 0.959复现条件被破坏)。沿用 mask=1274.9ms/轮)+ 实证稳定性风险显式记录 |
| 在役状态 | **A16 已恢复**TP8 EAGLE 4/1/5@0.90 + MRR32 + graph bs 4/8/12/16restart=unless-stopped |
## r35→r36一次死锁与一次修复本次核心工程产出
**r35**scheduler_pp_mixin_r35.pyr33 fb8c96f7 基础上去 GLOO
- dict 通道元数据`send_object`2 GLOO/字典 × 3 字典/)→ **8KB 固定尺寸 NCCL uint8 缓冲**pickle 零填充`pickle.loads` 天然忽略 STOP 后字节——已验证CPU 张量随车 GPU + `__pp_cpu_keys__` 回填
- pyobj 通道请求中继/控制面GLOO 阻塞 `dist.send` **两段式 NCCL**int64 size + uint8 payload空载优化 size=0 `world_group.device_group` dict 通道的 pp_group 通信器隔离FIFO 不串扰)。
- `_pp_nccl_stage_guard`fill-event + 双流 record_streamr33 实证isend 内核跑在调度器 ambient 流而非 send_streamguard 必须在 isend 入队前)。
- 修掉两处自捕 bugguard 原在 isend 之后无效门控)→ 重排`P2PWork` 须钉住实际发送对象contiguous() 副本)。
**r35 首部署死锁**py-spy 双端定格
- PP0_TP0 卡在 `_pp_send_pyobj_nccl` isend 懒加载 2-rank NCCL communicator 创建自旋102% CPU
- PP1_TP0 停在 `request_receiver.py:142 _pull_raw_reqs` GLOO `point_to_point_pyobj` irecv
- **根因通道断裂**——请求中继的发送端在 mixin 已切 NCCL接收端却在 `scheduler_components/request_receiver.py`补丁树之外仍走 GLOO两端永不相遇全库仅 2 `point_to_point_pyobj` 使用者无第三者顺序风险
**r36 修复**request_receiver_degloo.py 8 个挂载文件
- `_pull_raw_reqs` p2p 分支pp_rank0 attn_tp/cp_rank==0同步切两段式 NCCL 接收与发送端同通道同 FIFO 语义含空载 size=0 锁步)。
- `SGLANG_PP_DEGLOO` 门控=0 整体回退 r33 GLOO 行为
- 部署即刻通过健康 380s r33 完全一致)、 384,960冒烟 ALL-OKaccept 2.09-3.54
## 判决数据i8k/o1024/cc16/nreq32PG19 真实语料温度0warm+2
| 配置 | run | e2e P50 | out tok/s | TPOT P50 | TTFT P50 | accept | retract |
|---|---|---|---|---|---|---|---|
| PP+MTP r36 | 9402 | 111.2s | 136.0 | 105.2ms | 4.09s | 2.873 | 0 |
| PP+MTP r36 | 9403 | 116.3s | 133.6 | 106.5ms | 4.07s | 2.842 | 0 |
| B'同栈 nomtp | 9405 | **61.5s** | **266.7** | 51.4ms | 9.24s | | 0 |
| B'同栈 nomtp | 9406 | **61.6s** | **265.7** | 51.8ms | 9.29s | | 0 |
| 参照B 基线 | 09-08 上午 | 61.8s | 264.9 | 50.3ms | | | 0 |
| 参照A16 基线 | 09-08 上午 | 66.2s | 218.9 | 55ms | 4.0s | 2.50 | 7/7 |
语料窗口PP+MTP [19,662,144, 20,448,576)、B' [20,448,576, 21,235,008) 3×262,144=warm+2i8k 全唯一 prompt 窗口=32×8192
消耗至 **21,235,008 / 21,296,780** 61,772无复测余量复测须换语料)。run-id 9401-94069401/9404 warm不入判决)。
缓存纪律验证两配置 hit_rate=0.0窗口互不重叠、radix 干净)。
**MTP 增量拆解**稳态 16 并发 decode 190 tok/s per-req 11.9 tok/s step239ms8 并发段 step148ms(≈A16 137ms)。
步长随批超线性 + spec 每轮 4 forward3 draft + 1 verify eager+ 边界中继 2.85× 放大率不敌 4.5× 步长MTP 在本栈 cc16 **净负收益 1.59×**。
## cc16 杀手 profile16×16384/512 random-ids历史竞态触发器语料免费
| 配置 | 种子 | wall | out tok/s | E2E 中位 | TPOT 中位 | accept |
|---|---|---|---|---|---|---|
| r36 eager | 6402 | 105.3s | 77.8 | 72.2s | 72.5ms | 3.76 |
| r36 eager | 6403 | 106.0s | 77.3 | 72.6s | 73.1ms | 3.69 |
零崩溃、±1% 可复现SYNC_MASK=127 掩码下历史 SYNC_MASK=0 会触发 async-IMA 的同一 profile)。
注意random-ids accept 3.7+ 相对真实语料 2.85 虚高与既有结论一致
## Phase4 图模式判决r36g = r36 + FORCE_EAGER_DRAFT/VERIFY=0
- `cuda graph: True` 确认生效conc_test ALL-OK **accept len 1.05-1.11 / 接受率 0.02-0.04**draft 提议几乎全灭
- 质量门GSM8K-1 输出即数字噪声 **verify 图同样损坏**非仅 draft
- r33 注释"draft-decode cuda-graph capture issues on PP stages"实证为 draft+verify 双重捕获缺陷
- **修复方向**未来工程 cudagraph×spec 冲突清单桶形状/地址预分配/host 控制流等 8 做预分配补丁 + 图外 canary非配置级可解
## 文件清单md5
| 文件 | md5 |
|---|---|
| patches/scheduler_pp_mixin_r35.py | efce72af34b2e59f20d2eb0874f9f2b2 |
| patches/request_receiver_degloo.py | ad6c978a3e1efea395ec3d537a4fedd8 |
| scripts/deploy_ppmtp_r35.sh | 86fb4b576fb04eef7b71628324796ab7 |
| scripts/deploy_ppmtp_r36.sh | 7b80f4af0debccef8e87df4a2532d8dc |
| scripts/deploy_ppmtp_r36g.sh | dca9dd387a5e980dc81e25590b895646 |
| scripts/deploy_ppmtp_sanitize.sh | 5bb5a7dfaf00569d5408e487267129a6 |
| scripts/killer_cc16.sh | ac3dda7e05b416aecf1da978325e2584 |
| patches/request_receiver_orig_0901.py | vanilla 参考镜像原版 |
results/bench_logs/9401-9406 六轮语料 SUMMARYkiller s6402/6403质量门 r367/7/r36g灾难证据)、
四个部署日志san_crash_prehealth_s6401.log290Ksanitizer 不可行的完整证据链320×error209 噪声 + KV OOM 死因)。
60.8 服务器侧资产/root/scheduler_pp_mixin_r35.pyrequest_receiver_degloo.pydeploy_ppmtp_r35/36/36g.sh
sglang_patch2/r33 七件套不动)、corpus_ids.json消耗至 21,235,008)。
## 风险与遗留显式记录
1. **async-IMA 竞态未根治**sanitizer 路线不可行见上r36 全部验证在 SYNC_MASK=127 掩码下通过
动掩码/改流拓扑/图化任一变动都可能重新暴露动前必须重跑全套稳定性门
2. **PP+MTP 的兑现条件**后续若再战verify-step 需压到 <148ms 235@cc16/148@cc8)——图捕获修复Phase4 深水区
是最大单点杠杆否则 MTP PP 内为净负收益不如 BTP4PP2 nomtp)。
3. A16 三参数口径MRR32 + cuda-graph-max-bs-decode 16 + bs 4/8/12/16已从档案找回并用于恢复部署