record moe tiny batch matrix results

This commit is contained in:
2026-07-15 01:28:06 +08:00
parent af375830c7
commit d1f8048b6e
30 changed files with 7740 additions and 0 deletions

View File

@@ -765,3 +765,63 @@ ENGINEX_MOE_TINY_MAX=4
### 影响
这次优先目标是恢复平台可构建、可启动、可进入 benchmark-agent 验证流程。为降低平台构建风险,直接采用成功案例中已验证的一组补丁文件;此前本地 MoE tiny-batch 实验代码可能被成功案例的 native MoE/GDN 优化实现覆盖,后续如果平台构建通过,再基于这套可提交基线继续做性能优化分支。
## 2026-07-15MoE tiny-batch 矩阵实验
### 实验过程
远端实验目录:
- `/root/work/logs/moe_tiny_matrix_20260715_codex_05`
本地归档:
- `worklogs/remote_results/2026-07-15-moe-tiny-matrix/`
前两次启动没有形成有效结果:
- `codex_03`:未加 `--enforce-eager`,服务加载后卡在 CUDA Graph capture`/health` 一直拒绝连接。
- `codex_04`:已加 `--enforce-eager`,但旧的 `codex_03` 服务仍占用显存,导致新服务加载 MoE 权重时 OOM。
有效实验为 `codex_05`,先清理旧进程,再用 `--enforce-eager` 重跑 5 组矩阵。
固定压测口径:
- `prompt_mode=short`
- `concurrency=2`
- `requests=4`
- `max_tokens=128`
- `max_num_seqs=2`
- `max_model_len=100000`
- `tp=4`
- `enable_prefix_caching`
- `enable_chunked_prefill`
### 结果
| case | success | TTFT P90 | Output TPS P10 | Output TPS P50 | Aggregate Output TPS | Avg GPU util | Max GPU util |
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
| `bmm_max16` | 100.00% | 1.401 | 6.245 | 6.381 | 11.958 | 53.2 | 100.0 |
| `bmm_max8` | 100.00% | 1.424 | 6.900 | 6.957 | 12.907 | 54.7 | 100.0 |
| `tokenwise_max16` | 100.00% | 1.312 | 6.292 | 6.387 | 12.003 | 54.8 | 100.0 |
| `tokenwise_max4` | 100.00% | 1.671 | 6.377 | 6.416 | 11.868 | 51.4 | 100.0 |
| `tokenwise_max8` | 100.00% | 1.589 | 6.347 | 6.357 | 11.788 | 54.6 | 100.0 |
### 结论
本轮最佳结果是:
- `ENGINEX_MOE_TINY_IMPL=bmm`
- `ENGINEX_MOE_TINY_MAX=8`
- Aggregate Output TPS = `12.907`
- Output TPS P10 = `6.900`
相对上一轮 `tokenwise_max4` 的有效结果 `11.28`,本轮 `bmm_max8` 聚合吞吐约提升 `14.4%`。但要注意两轮测试的启动环境不同:本轮强制 `--enforce-eager`,且经过多次重启,不能把这个提升完全归因于 `bmm` 实现。
更重要的是,这个矩阵**没有真正验证 `T > TINY_MAX` 后按块拆分是否有收益**。原因是本轮压测固定 `max_num_seqs=2`decode 阶段 `T` 基本是 1-2因此 `TINY_MAX=4/8/16` 都会命中同一 tiny fast path。也就是说
- `tokenwise_max4/8/16` 之间的差异主要是重启和运行噪声。
- `bmm_max8/16` 之间的差异也主要是噪声。
- 本轮更有价值的对比是 `tokenwise``bmm` 两种 tiny implementation。
从本轮结果看,在 `T≈2` 的短输出 decode 场景里,`bmm` 路径不差于 `tokenwise`,并且本次最佳是 `bmm_max8`。下一步如果要验证“`T` 大于阈值后分块计算”的思路,需要把 `max_num_seqs` 提到 8 或 16或构造能让单步 decode 聚合更多 token 的压测,否则 `TINY_MAX` 参数不会真正生效。