evalstone/README.md
2026-07-23 06:54:36 +00:00

158 lines
4.9 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.

# EvalScope 评测套件DeepSeek-V4-Flash-INT8 定制版)
本仓库基于 [EvalScope](https://github.com/modelscope/evalscope) 构建,面向 **DeepSeek-V4-Flash-INT8no-thinking / thinking** 模型,提供一键化、可断点续跑、可汇总对比的 benchmark 评测能力。
---
## 1. 仓库定位
- **底座**EvalScope 开源评测框架(本地 editable 安装)。
- **目标模型**DeepSeek-V4-Flash-INT8通过本地 sglang 服务以 OpenAI API 形式调用。
- **核心产出**
- 标准化 benchmark 分数(与 Kimi / GLM / DS 官方对比表对齐)。
- 每个 benchmark 的详细预测、review、报告 JSON。
- 汇总 Excel / CSV含真实运行时间active time统计。
---
## 2. 目录结构
```
/data1/sora/evalscope/
├── bash/ # 评测入口与辅助脚本
│ ├── run.py # 统一评测入口full/lite/mid/group*/official
│ ├── collect_results.py # 汇总各 benchmark 分数到 Excel/CSV
│ ├── perf_backup.py # 断点续跑:备份/恢复 predictions 与 perf
│ └── pull_swe_bench_images.py # 预拉 SWE-bench Docker 镜像
├── config/
│ └── dpv4-int8_nothinking.yaml # 各 benchmark 的 temperature / max_tokens 配置
├── tools/docker/ # Docker 镜像构建上下文
│ ├── Dockerfile.py312 # evalscope-complete-py312 镜像定义
│ ├── bash/ # 构建时内置的入口脚本
│ └── evalscope/ # 构建时内置的源码
├── myread.md # 完整使用手册环境、数据、Docker、参数、结果
├── DOCKER_BUILD.md # Docker 镜像构建实录
└── results/ # 汇总 Excel / CSV 输出目录
```
---
## 3. 核心能力
### 3.1 统一入口 `bash/run.py`
一个脚本跑所有 benchmark
```bash
python bash/run.py \
--model DeepSeek-V4-Flash-Int8 \
--api-url http://localhost:30000/v1 \
--dataset-dir /data1/sora/evalscope \
--output-dir /data1/sora/evalscope/output \
--suite official \
--limit none
```
支持 suite
| suite | 说明 |
|-------|------|
| `full` | 全部 benchmark + multi-run |
| `lite` | 快速冒烟 |
| `mid` | 较全子集 |
| `group1/2/3` | 多机组分组 |
| `official` | 腾讯入库标准对比表核心子集 |
### 3.2 thinking 模式
```bash
# 开启 thinkingmax_tokens 按倍数放大
python bash/run.py --suite official --thinking --thinking-max-tokens-scale 2.0
# 或在原 max_tokens 基础上再加 token
python bash/run.py --suite official --thinking --max-tokens-add 32768
```
### 3.3 输出目录结构
```
output/
└── {folder_name}/ # 默认 model_namethinking 时默认 model_name_THINKING
├── {benchmark}/
│ └── seed_{seed}/
│ ├── predictions/
│ ├── reviews/
│ ├── reports/{benchmark}.json
│ └── logs/
└── active_time/ # 真实运行时间累计
results/
└── {folder_name}.xlsx # 汇总表格
```
### 3.4 断点续跑
- 通过 `perf_backup.py` 在每次 benchmark 结束后备份 predictions 和 report。
- 再次运行同一 benchmark 时自动恢复,避免重复推理。
- 运行时间通过 `active_time/` 累计kill 后重启不会把等待时间算进去。
---
## 4. 快速开始
### 4.1 环境(宿主机)
```bash
conda create -n evalscope python=3.12 -y
conda activate evalscope
cd /data1/sora/evalscope
pip install -e ./evalscope
```
### 4.2 数据
参考 `myread.md` 第 4 章,从 ModelScope 下载数据集到 `datasets/`
### 4.3 Docker 一键评测
```bash
docker load -i docker/evalscope-complete-py312.tar.gz
docker run -it --rm \
--network host \
-v /data1/sora/evalscope:/opt/evalscope \
-v /data1/models:/opt/models \
-v /var/run/docker.sock:/var/run/docker.sock \
evalscope-complete-py312:latest \
bash -c "cd /opt/evalscope && python bash/run.py --suite official --limit none"
```
---
## 5. 主要自定义增强
相较于上游 EvalScope本仓库额外增加了
- `--folder-name`:自定义顶层输出文件夹。
- `--thinking` / `--thinking-max-tokens-scale` / `--max-tokens-add`:支持 thinking 模型评测。
- `official` suite对齐腾讯入库标准的 8 个核心 benchmark。
- `active_time` 机制:更准确地测量 benchmark 真实运行时间。
- `perf_backup.py`:支持 kill 后断点续跑。
- `pull_swe_bench_images.py`:支持批量预拉 SWE-bench 镜像。
---
## 6. 相关文档
- 完整使用手册:`myread.md`
- Docker 构建实录:`DOCKER_BUILD.md`
- 上游 EvalScope 文档https://evalscope.readthedocs.io/
---
## 7. 维护者
- 仓库:`git.meta-stone.net/sora/evalstone.git`
- Docker 镜像:`SoraAmami/evalscope-docker`ModelScope
- 数据集:`SoraAmami/evalscope-datasets`ModelScope