docs: complete sub508 diagnosis — 19 cascade failures from n=2, full test matrix

This commit is contained in:
Claude
2026-08-07 07:54:09 +00:00
parent 994c6575af
commit 05c775ca11

View File

@@ -1,57 +1,48 @@
# Sub509 诊断报告 — 2026-08-07
# Sub508/509 完整诊断报告
## 评测结果对比
## 修复提交记录
| 测试 | Sub168 (对手) | Sub509 (我们) | 状态 | 根因 |
|------|--------------|--------------|------|------|
| d01_basic_nostream | 8.49s, content[11], 139tok | 95.85s, content[0], 1085tok | ✓ PASS | decode 慢 + thinking 过长 |
| d02_stream_usage | 2.75s | 1.84s | ✓ PASS | OK |
| **d03_tool_call** | **2.12s, tools=1** | **49.04s, tools=0, finish=stop** | **✗ FAIL** | **thinking 吃完 token budget** |
| d04_reasoning | 17.78s | 128.74s | ✓ PASS | decode 慢 |
| Commit | 修复 | 影响 |
|--------|------|------|
| e0344b1 | 禁用 tool_call 请求的 thinking | d03 FAIL → 预计 PASS |
| c241764 | get_scheduler_config try-catch | 防止引擎崩溃 |
| 994c657 | clamp n>1 to 1 | 防止 t2_n_2 级联崩溃 (19 个测试) |
## d03_tool_call FAIL 根因链
## Sub508 完整测试结果 (56 tests)
```
评测器发 tool_choice=auto + tools=[get_weather],不带 thinking 参数
→ enable_thinking 默认 True
→ 模型进入 <think>...</think> 模式
→ BI-V100 decode 极慢 (~11 tok/s)49 秒全在 thinking
→ max_tokens 耗尽finish=stop
→ 从未输出 <tool_call> XML
→ tool_parser 检测不到 <function=
→ tools_called=False, finish_reason="stop"
→ ✗ FAIL
```
### 实际结果: PASS=21, FAIL=30, SKIP=5
## 已提交修复 (commit e0344b1)
### 级联崩溃 (19 个 FAIL 来自 t2_n_2 引擎崩溃)
t2_n_2 → HTTP 500 → 引擎死亡 → t3_max_tokens_none/1/64/mid/max/neg1/over,
t4a/4b, t5, t6, t7, t8, t9, t10, t12_chinese/japanese/emoji 全部 HTTP 500
1. **protocol.py**: `normalize_messages` 里当 tools 活跃 + tool_choice=auto + thinking 未显式设置时,自动 `enable_thinking=False`
2. **qwen3coder_tool_parser.py**: `adjust_request()` 做相同检查defense-in-depth
3. **baseline.muh**: 同步实际部署配置 (max_num_seqs=1, 去掉 chunked_prefill)
### 修复后预期: PASS ≈ 40+, FAIL ≈ 10-
## 性能差距分析
### 真正的功能性 FAIL (非级联)
对手 decode 速度约 16 tok/s (139tok / 8.49s)
我们 decode 速度约 11 tok/s (1085tok / 95.85s)
| 测试 | 状态 | 根因 | 可修 |
|------|------|------|------|
| d03_tool_call | tools=0 finish=stop | ✅ 已修复 thinking budget | 是 |
| d05_multimodal | HTTP 400 | multimodal 请求格式 | 需查 |
| d07_reasoning+content | content[0] | 模型 think 后不产 content | 否(模型) |
| d10_thinking_disable_ctk | 乱码 content | 模型质量 | 否(模型) |
| t1a_thinking_true | reasoning[0] | 模型跳过 thinking | 否(模型) |
| t1c_thinking_default | reasoning[0] | 同上 | 否(模型) |
| t2_n_2 | HTTP 500 → cascade | ✅ 已修复 clamp n | 是(防崩) |
差距来源:
- BI-V100 vs 对手硬件(未知,可能是 A100/H100
- enforce_eager=True 禁用了 CUDA graphs
- 单卡 SMEM 48KB vs 高端卡 192KB+
- xformers head_dim>128 fallback 走 PyTorch SDPA非 FlashAttention
## 对手 Sub168 对比
## 下一步优化方向
| 维度 | 对手 | 我们 |
|------|------|------|
| functional PASS | ~50/56 | 21/56 → 修后 ~40/56 |
| d01 速度 | 8.49s | 95.87s |
| d04 速度 | 17.78s | 129.19s |
| replay max_completion_tokens | ✗ 400 rejected (30+次) | ✓ 已支持 (extra=ignore) |
| replay tool_calls content=None | ✗ 400 rejected | ✓ 已支持 (normalize) |
| decode TPS | ~16 tok/s | ~11 tok/s |
### 紧急 (影响评分)
- [ ] 提交后看完整 d05~d16+ 测试结果
- [ ] 如有其他 FAIL同样根因分析
### 中期 (提升 TPS)
- [ ] 检查 _PYTORCH_DECODE_THRESHOLD=999999 是否可以降低以启用 PyTorch fallback 对特定 seq_len 范围
- [ ] sampler 的 .tolist()/.cpu() sync 点优化(但这是 vllm 标准路径)
- [ ] V2 attention partition_size 根据 BI-V100 SM count 调优
### CCCL 架构借鉴
- [ ] tuning_reduce.cuh 的 scale_mem_bound 公式应用到 BI-V100max_smem=49152
- [ ] tuning_scan.cuh 的 ScanLookbackPolicy 参数对标 muh schema YAML
- [ ] policy_selector DSLcompute_capability 维度改为 BI-V100 硬件描述
## 我们 vs 对手的优势
1. `max_completion_tokens` 支持 — 对手 replay 有 30+ 个 400 错误
2. `tool_calls` content=None 支持 — 对手 replay preflight 失败
3. `reasoning_effort` 字段容忍 — 对手被拒
4. prefix caching 工作 (d06 PASS) — 对手 d06 FAIL