EvalHarness/MEMORY.md

157 lines
8.2 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.

# EvalHarness × evalscope 28-Bench 对齐工程 — 完整工作记忆
> 最后更新2026-09-03 00:40fix2 轮prompt 逐字对齐 + 同题重跑)
> 状态20/28 fix2 同题达标(<0.05judge quota 阻塞 hle/imomath 题库不同待换源tau2 强用户未完
---
## 1. 硬件与访问(关键!)
### GPU 集群4 台机器20 个 Qwen3-8B vLLM 实例)
| 机器 | IP | GPU | vLLM 端口 | SSH |
|---|---|---|---|---|
| A100-105 | 10.10.81.105 | A100×8 (40G) | 8123-8130 | `sshpass -p '314159' ssh amax@10.10.81.105`vLLM 已改 0.0.0.0 监听)|
| 3090-138 | 10.10.80.138 | 3090×8 | 8200-8203 | `sshpass -p 'Amax1979!@#$' ssh amax@10.10.80.138` |
| 3090-140 | 10.10.80.140 | 3090×8 | 8210-8213 | `sshpass -p 'Amax1979!!!' ssh amax@10.10.80.140` |
| 3090-143 | 10.10.80.143 | 3090×8 | 8220-8223 | `sshpass -p 'Amax1979!!!' ssh amax@10.10.80.143` |
- **105 备用 SSH**vLLM 只听本地时用):`sshpass -p '314159' ssh amax@127.0.0.1 -p 2222`Mac 反向隧道)
- **105 vLLM 重启脚本**`/home/amax/restart_vllm32_public.sh`0.0.0.0 版;原版 `restart_vllm32.sh` 是 127.0.0.1
- 105 参数:`--max-model-len 131072 --max-num-seqs 32 --gpu-memory-utilization 0.90 --enforce-eager --tool-call-parser hermes --reasoning-parser qwen3`,模型 `/nvme1/hf_models/Qwen3-8B`yarn rope 4×
- **Mac 隧道**曾是不稳定根源今日退役中138 是 Tailscale 子网路由器138→140/143/105
- GPU 利用率:`sshpass ... ssh amax@<ip> "nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader"`
### 评测机(本机)路径
```
/data1/sora/evalharness/EvalHarness # 我们的框架git repo, main 分支)
/data1/sora/evalharness/evalscope # es 源码副本es_one2 实际加载这份!改 es 要改这里)
/data1/sora/evalscope # es 另一份(参考用)
/data1/sora/evalharness/temp/cache # EVALHARNESS_CACHE 数据集缓存
/data1/sora/evalharness/temp/full_ladder/{ours,es}/ # 全部结果 json
/data1/sora/evalharness/temp/full_ladder/es_w<bench>_k200/ # es work_dirs预测缓存
~/.cache/evalharness/ckpt/ # 我们 per-sample checkpoint
/data1/sora/evalharness/EvalHarness/error.md # ★ 全部踩坑记录16 我方 bug + 6 es 问题)
```
### 关键凭据
- judge API`https://api.vectron.meta-stone.com/v1`,模型 `DeepSeek/DeepSeek-V4-Flash`key `sk-6cad3e9b981e1396c1179c1cac158a2a`launcher 必须带 `OPENAI_API_KEY`,否则 llm_judge 全 401
- 磁盘根盘曾两次写满——HF 缓存在 `/data2/hf_home`HF_HOMEmodelscope 缓存已清es 下载数据会重新拉)
---
## 2. 模型 spec 语法(我们框架)
```
openai-pool/http://127.0.0.1:{8123..8130}/v1?Qwen3-8B!nothink # 8口池+关思考
openai-pool/http://10.10.80.143:{8220..8223}/v1?Qwen3-8B!nothink # 直连池
openai/http://127.0.0.1:8129/v1?Qwen3-8B!nothink # 单口定向
```
- `!nothink`:普通请求走 `chat_template_kwargs:{enable_thinking:false}`干净tools 请求退回 `/no_think` 软开关(模板 400 规避)
- pool 支持多段逗号:`{8123..8130}/v1,http://...{8200..8213}/v1`
---
## 3. 任务总账28 bench
### ✅ 已终值对齐同口径diff≤0.05
| bench | ours | es | 备注 |
|---|---|---|---|
| bbh | 0.819 | 0.8185 | 27子集×10官方3-shot CoT |
| mmlu | 0.795 | 0.800 | es CoT契约+域匹配范例 |
| imo | 0.19 | 0.198 | judge 协议统一Problem:前缀)|
| simple_qa | 0.050 | 0.0503 | 同题前200 |
| gsm8k | 0.945 | 0.940 | es 式 Reasoning few-shot |
| winogrande | 0.655 | 0.655 | es `A)` 渲染 |
| humaneval | 0.8415 | 0.805 | es 指令头+metadata promptharness 修复)|
| cmmlu | 0.785 | 0.772 | 中文契约逐字 |
| hle | 0.031 | 0.050 | judge 修复后 |
| gpqa | 0.460 | 0.480 | /no_think 污染修复后 |
| trivia | 0.700 | 0.660 | 开卷对齐wiki_context 键名修复)|
| bigcodebench | 0.375 | 0.365 | es 执行器 bug 我们修的0.99→0.365 三方一致)|
| **drop** | **0.78** | 0.81 | es 精确 3 范例硬编码后(-0.03 = 判分语义内)|
| arc | E0.98/C0.90 | 0.930 | es 渲染 |
| mrcr / swe | 0.0 | 0.0 | 真实能力thinking 也 0|
### 🔄 同题版收尾中(脚本就绪,网络恢复自动跑)
| bench | ours | es | 状态 |
|---|---|---|---|
| math L×40 | **0.90** | 卡 199/200 重跑中 | `/tmp/opencode/es_math_d2.log` |
| bfcl 20/类 | **0.266** | 0.174 | ✓es 空回复衰减坐实)|
| lb2 medium | 0.273 | 待出 | |
| hswag 400 | 待出(真同题)| 0.5725 | `/tmp/opencode/mcq_f6.log` |
| cmmlu/gfc/sqa 同题 | 跑中 | 部分待出 | |
### 📊 12 轮均值temp=1.0 双侧)
| bench | ours | es |
|---|---|---|
| aime25 | 0.193+ | **0.214**12/12 完)|
| aime26 | ~0.17 | 0.1899/12|
| hmmt26 | 新模板(Problem:前缀)验证中 [0.182,0.182] | **0.205**12/12|
### ⏳ 挂起待收
- tau2 强用户终版gen_kwargs 修复后)/ LCB 官方判定器复判(本地 CPU
- es 同题math/lb2/hswag/arc/cmmlu/sqano_shuffle fresh work_dir
---
## 4. 正在跑 / 怎么跑
### 哨兵(必须知道)
```bash
/tmp/opencode/auto_all.sh # 每3分钟探测105+3090通了自动拉起全部等待任务setsid 运行中)
tail /tmp/opencode/auto_all.log
```
### 任务脚本目录 /tmp/opencode/
| 脚本 | 用途 |
|---|---|
| `es_one2.py <bench> <k> <out>` | es 单 bench 跑批env: EVAL_API/ES_WORK_DIR/ES_NOSHUFFLE=1 关shuffle/ES_SUBSETS 限定子集)|
| `mm_sq.py` | 我们 mmlu_pro+math 同题no_shuffle|
| `mcq_clean.py` | hswag+arc 同题 es 渲染 |
| `runs7_105.py`/`runs7more.py`/`runs7_np.py` | 12 轮105/3090 分池)|
| `tau2_strong.py` | tau2 强用户TAU2_DATA_DIR=/data1/sora/evalharness/dataset/tau2-bench-main/data|
| `lcb_official.py` | LCB 官方 codegen_metrics 复判CPU|
| `drop_gold.py` | drop 同题 100 |
### 跑批铁律(血泪教训)
1. **改 prompt/模板 → 必删对应 ckpt**`rm ~/.cache/evalharness/ckpt/<name>*`),否则复用旧预测
2. 后台启动用 `setsid ... < /dev/null &` 立即返回nohup 会被 bash 工具 timeout 连坐杀)
3. `pkill -f <pattern>` 会杀自己所在 shellcmdline 含 pattern→ 用 launcher 文件
4. checkpoint 打印 `restored N (M to generate)` N≠M 时警惕 key 失配
---
## 5. 已修的 bug详见 error.md共 16 我方 + 6 es
**判分层**few_shot_hook 未挂载 / MCQ '(A)' 格式 / llm_judge 子串扫描 / dict 聚合器主指标覆盖 / judge 401
**配对层**:双重 _apply_limits 错位 / ckpt 不含 subset / **ckpt 不含 prompt** / **no_shuffle 判分侧错位**runner.py:514 要带 shuffle=not no_shuffle/ 选样语义es=每子集独立 shuffle42
**prompt 层**/no_think 污染 / **A. vs A) 渲染差 22 分** / 12+ 处逐 bench 模板mmlu CoT 契约、gsm8k Reasoning 范例、aime 指令前置、imo/hmmt Problem:前缀、trivia 开卷、lb2 <text> 包装、LCB 代码契约、humaneval 指令头+metadata、drop es 精确范例 hook
**env 层**tau2 gen_kwargs 透传 / tau2 reward 字段 / HF 下载 to_thread
**es 侧修的**BCB 执行器空跑unittest 标记)/ gfc finish_reason 误判or bool(tool_calls)/ tau2 reasoning 剥离崩溃(定位未修)/ LCB 本地 -2docker 修复)
---
## 6. 下一步(优先级)
1. **收同题尾巴**es math199/200 卡住重跑)/ hswag 真同题 / lb2/cmmlu/sqa/gfc 同题 → 哨兵自动
2. **12 轮齐**:我们 aime26×6 + hmmt×7新模板版+ es aime26×2
3. **tau2 终版 + LCB 官方复判**
4. **hmmt 新模板 3 轮均值**Problem: 前缀已 +0.06,看能否到 es 0.205
5. **终表**:全对齐数字汇总进 `FINAL_REPORT.xlsx`(现有 5 sheetLadder/Aligned/Bugfix/ES问题/终局对比)+ error.md 归档
## 7. 常用检查命令
```bash
# GPU
for h in 10.10.81.105 10.10.80.138; do sshpass -p ... ssh amax@$h "nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader"; done
# 端口健康
for p in 8123 8200 8220; do curl -s -o /dev/null -w "$p:%{http_code} " http://127.0.0.1:$p/health; done
# 105 vLLM 崩了重启
timeout 30 sshpass -p '314159' ssh amax@127.0.0.1 -p 2222 "bash /home/amax/restart_vllm32_public.sh"
# 任务进度
grep -hE ':.*n=|==|k=' /tmp/opencode/*.log | grep -vE 'Warning|checkpoint'
```