docs: restructure README workflow to price first, then select datasets, then test
This commit is contained in:
parent
bd1e2d7e46
commit
6ccc38bcb5
@ -136,28 +136,27 @@ python3 tools/fill_excel_cost.py \
|
||||
--model-name GLM-5.2
|
||||
```
|
||||
|
||||
## 6. 价格预测与预算内选 dataset
|
||||
## 6. 价格预测 → 选 dataset → 跑测试
|
||||
|
||||
### 6.1 多模型成本预测
|
||||
推荐按下面三步走:先人工算好价格、选定 benchmark,再执行测试。
|
||||
|
||||
`tools/predict_costs.py` 根据 `bash/case/model_pricing.yaml` 里的价格,对每个 benchmark 生成所有模型的成本矩阵。
|
||||
### 步骤 1:价格预测(人工决策)
|
||||
|
||||
`tools/predict_costs.py` 根据 `bash/case/model_pricing.yaml` 里的模型单价和折扣,对每个 benchmark 生成所有模型的成本矩阵。
|
||||
|
||||
```bash
|
||||
# 生成 results/P800_benchmark_cost_all_models.csv/.xlsx
|
||||
# 生成全部模型 / 全部 benchmark 的成本矩阵
|
||||
python3 tools/predict_costs.py
|
||||
|
||||
# 指定预算,筛选可测的 benchmark
|
||||
# 指定预算上限,输出预算内可测的 benchmark
|
||||
python3 tools/predict_costs.py --budget 100
|
||||
|
||||
# 换模型价格表或基准 token 统计
|
||||
python3 tools/predict_costs.py \
|
||||
--pricing bash/case/model_pricing.yaml \
|
||||
--benchmark "results/P800_benchmark_cost_GLM52.csv" \
|
||||
--budget 500 \
|
||||
--output results/my_cost_matrix
|
||||
```
|
||||
|
||||
输出示例:
|
||||
输出文件:
|
||||
- `results/P800_benchmark_cost_all_models.csv/.xlsx`:完整成本矩阵
|
||||
- `results/P800_benchmark_cost_all_models_budget_100.csv/.xlsx`:预算内可测列表
|
||||
|
||||
终端会打印各模型跑完全部 benchmark 的总成本,例如:
|
||||
|
||||
```text
|
||||
=== 各模型总成本(元)===
|
||||
@ -171,9 +170,11 @@ python3 tools/predict_costs.py \
|
||||
DeepSeek-V4-Flash: 360.03
|
||||
```
|
||||
|
||||
### 6.2 按预算选择 datasets
|
||||
> 注意:`model_pricing.yaml` 里的价格为公开参考价或占位价,实际测试前请按合同价修改。
|
||||
|
||||
假设总预算 100 元,脚本会输出每个模型在预算内可测的 benchmark。例如:
|
||||
### 步骤 2:按预算选 datasets(人工决策)
|
||||
|
||||
打开生成的预算筛选表,根据总预算和想覆盖的能力维度勾选 benchmark。例如预算 100 元时:
|
||||
|
||||
```text
|
||||
预算 100.00 元内可测的 benchmark
|
||||
@ -181,17 +182,33 @@ python3 tools/predict_costs.py \
|
||||
GLM-5.2: 22 个 -> bigcodebench, humaneval, live_code_bench, aime24, ...
|
||||
```
|
||||
|
||||
拿到列表后,直接替换 `EVAL_DATASETS` 即可开跑:
|
||||
把选好的 benchmark 列表写到 `EVAL_DATASETS`:
|
||||
|
||||
```bash
|
||||
export EVAL_DATASETS="gpqa_diamond,winogrande,general_fc"
|
||||
```
|
||||
|
||||
### 步骤 3:跑测试
|
||||
|
||||
设置 API key、模型、输出目录后启动:
|
||||
|
||||
```bash
|
||||
export EVAL_API_KEY="sk-xxxx"
|
||||
export EVAL_MODEL="DeepSeek/DeepSeek-V4-Flash"
|
||||
export EVAL_DATASETS="bigcodebench,humaneval,live_code_bench,aime24,aime25"
|
||||
export EVAL_FOLDER_NAME="V4-Flash-budget-100"
|
||||
export EVAL_API_URL="https://api.example.com/v1"
|
||||
export EVAL_MODEL="glm-5.2"
|
||||
export EVAL_DATASETS="gpqa_diamond,winogrande,general_fc"
|
||||
export EVAL_FOLDER_NAME="GLM52-budget-100"
|
||||
|
||||
bash bash/case/GLM52_API_TEST1.sh
|
||||
```
|
||||
|
||||
### 6.3 与历史价格对比
|
||||
也可以用内置 mode 快速跑一套:
|
||||
|
||||
```bash
|
||||
bash bash/case/GLM52_API_TEST1.sh --mode quick
|
||||
```
|
||||
|
||||
### 6.1 与历史价格对比
|
||||
|
||||
飞书 wiki 里的历史价格需要手动导出为 CSV 并放到 `data/historical_prices.csv`,随后可写对比脚本。目前预测表已生成,可直接用于人工对比。
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user