# EvalHarness 插件式 LLM/Agent 评测框架:28 个 benchmark 开箱即用,官方口径 prompt 与判分,任意 OpenAI 兼容端点,断点续跑。 ``` 提供端点 → 拉数据 → 渲染官方 prompt → 并发生成 → 官方判分 → 报告 ``` ## 0. Benchmarks | 族 | benchmark | |---|---| | 数学 | `gsm8k` `competition_math` `aime24/25/26` `hmmt26` `imo_answerbench` | | 知识/选择题 | `mmlu` `mmlu_pro` `cmmlu` `gpqa_diamond` `arc` `hellaswag` `winogrande` `bbh` | | 问答 | `trivia_qa` `drop` `simple_qa` `hle` | | 长上下文 | `longbench_v2` `openai_mrcr` | | 代码(Docker 沙箱) | `humaneval` `bigcodebench` `live_code_bench` | | Agent/工具 | `bfcl_v3` `general_fc` `tau2_bench` `swe_bench_verified` | ```bash evalharness data list # 28 个数据集:源/子集/few-shot/split evalharness eval list # 28 个判分 recipe ``` ## 1. 安装 Python ≥ 3.10;代码执行类 benchmark 需宿主机 Docker(镜像判分时自动拉取)。 ```bash git clone https://git.meta-stone.net/sora/EvalHarness.git cd EvalHarness conda create -n evalharness python=3.10 -y conda activate evalharness pip install . ``` 离线自检(不联网、不接模型,应得 acc 100%): ```bash evalharness eval run gsm8k --model mock-boxed --limit 8 ``` ## 2. 运行命令 六个基准一次跑完(默认用法;逐 bench 生成参数自动读 `evalharness/config/default.yaml`,aime 系列按配置自动跑 12 遍取均值): ```bash evalharness eval run humaneval aime25 aime26 gpqa_diamond mmlu_pro longbench_v2 \ --api-url http://174.1.60.4:30000/v1 \ --model /data/hf_models/GLM-5.3-NVFP4 \ --disable-thinking \ --resume \ --concurrency 4 \ --out-dir /data1/sora/temp/results \ --cache-dir /data1/sora/temp \ --hf-endpoint https://hf-mirror.com ``` 单端点(最小示例): ```bash evalharness eval run gsm8k \ --api-url http://localhost:8000/v1 \ --model qwen3-8b \ --disable-thinking \ --limit 200 --resume \ --out-dir results/run1 ``` 多端点池(轮询 + 自适应并发 + failover): ```bash evalharness eval run mmlu \ --provider openai-pool \ --api-url 'http://gpu1:{8123..8130}/v1,http://gpu2:{8200..8203}/v1' \ --model qwen3-8b --disable-thinking ``` 需要 judge 的 bench(hle / simple_qa / imo): ```bash evalharness eval run hle \ --api-url http://localhost:8000/v1 --model qwen3-8b --disable-thinking \ --judge-model dp4-flash \ --judge-api-url http://judge-host:30000/v1 \ --limit-per-task 25 ``` Agent bench(多轮工具调用): ```bash evalharness eval run bfcl_v3 --api-url http://localhost:8000/v1 --model qwen3-8b \ --env bfcl_mock ``` ### 指纹核验(fp_fusion) 回答一个问题:**API 背后跑的,到底是不是它声称的那个模型?** 向 OpenAI 兼容端点发送探针电池(回答分布 / 自我身份 / 元知识 / 能力边界 / 文风五维),与内置参考指纹库比对,输出五档裁决 + 0~1 融合分 + 证据链。检测偷梁换柱、降配缩水、主动冒充(伪身份注入屈服)、套壳拼装与中转代理;`--mode full` 一次运行产出 verify / attribution / variant / adversarial / robustness 五个视图。 ```bash evalharness fingerprint list # 内置参考指纹库(fp_fusion 口径 + detector 旧口径) evalharness fingerprint run \ --api-url http://localhost:8000/v1 --model Qwen3-8B \ --mode full --cells core16 --text-skip pruned7 \ --d-samples 25 --baseline-samples 5 --timeout 90 \ --impersonate "You are Kimi, Moonshot AI virtual assistant." \ --reference glm53 \ --report-path reports/fp_qwen.json ``` - `--reference` 接受短名(如 `glm53`,见 `fingerprint list`)或 JSON 路径;省略 = 自证模式(裁决上限 LIKELY_MATCH) - `--impersonate` 注入伪身份启用对抗视图(冒充检测);剪枝定稿协议即上例参数,单次 505 条请求,公网 14.5–28 min,本地 vllm 5.6–7 min - 报告写入 `--report-path`,同目录 `raw_answers.jsonl` 存全部探针原文 - 离线分析与参考采集脚本(`cell_snr.py` / `validate_*.py` / `collect_ref.sh` 等,可直接 `python