feat(v2): T12+T13 实验脚本 bench_tokens 与 E1 token 经济学跑数
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
id,domain,a1_full,a2_ws,a3_rollup,a4_prefix,prefix_hit,reduction_a2,reduction_a4
|
||||
code_01,code,408,169,209,209,163,0.5858,0.4877
|
||||
code_02,code,402,162,202,202,156,0.597,0.4975
|
||||
code_03,code,406,166,206,206,161,0.5911,0.4926
|
||||
math_01,math,395,155,195,195,150,0.6076,0.5063
|
||||
math_02,math,392,153,193,193,147,0.6097,0.5077
|
||||
legal_01,legal,408,169,209,209,166,0.5858,0.4877
|
||||
medical_01,medical,403,157,197,197,158,0.6104,0.5112
|
||||
finance_01,finance,399,153,193,193,154,0.6165,0.5163
|
||||
life_01,life,392,152,192,192,146,0.6122,0.5102
|
||||
education_01,education,396,148,189,189,154,0.6263,0.5227
|
||||
general_01,general,403,157,197,197,158,0.6104,0.5112
|
||||
general_02,general,396,149,190,190,150,0.6237,0.5202
|
||||
|
@@ -0,0 +1,38 @@
|
||||
# E1 token 经济学(本地确定性测量)
|
||||
|
||||
> 模式:本地 estimate_tokens 测量(不调用真实 API)。真实数据需 --live + API key + 本地模型。
|
||||
|
||||
- 样例数:12
|
||||
- A1 全量上下文均值:**400.0 token**
|
||||
- A2 交流文本均值:**157.5 token**
|
||||
- A3 A2+rollup 均值:**197.67 token**
|
||||
- A4 A3+prefix 均值:**197.67 token**(prefix 可命中 155.25 token)
|
||||
|
||||
## 北极星指标(token 下降 ≥80%)
|
||||
|
||||
- A2 相对 A1:**60.6%**
|
||||
- A4 相对 A1:**50.6%**
|
||||
|
||||
### 说明(诚实解读)
|
||||
|
||||
1. 本报告为本地确定性测量(estimate_tokens),未调用真实 API。
|
||||
2. A3(rollup)收益为规模相关:小样例下 archive 增量可能抵消收益,长会话才显现。
|
||||
3. 前缀稳定性(T10)已验证,配合 llama-server --cache-reuse 可复用稳定前缀。
|
||||
4. 北极星 ≥80% 需在 --live 模式(API key + 本地模型)下由 E1 实验确认。
|
||||
|
||||
## 明细
|
||||
|
||||
| id | domain | A1 | A2 | A3 | A4 | prefix_hit |
|
||||
|----|--------|----|----|----|----|----|
|
||||
| code_01 | code | 408 | 169 | 209 | 209 | 163 |
|
||||
| code_02 | code | 402 | 162 | 202 | 202 | 156 |
|
||||
| code_03 | code | 406 | 166 | 206 | 206 | 161 |
|
||||
| math_01 | math | 395 | 155 | 195 | 195 | 150 |
|
||||
| math_02 | math | 392 | 153 | 193 | 193 | 147 |
|
||||
| legal_01 | legal | 408 | 169 | 209 | 209 | 166 |
|
||||
| medical_01 | medical | 403 | 157 | 197 | 197 | 158 |
|
||||
| finance_01 | finance | 399 | 153 | 193 | 193 | 154 |
|
||||
| life_01 | life | 392 | 152 | 192 | 192 | 146 |
|
||||
| education_01 | education | 396 | 148 | 189 | 189 | 154 |
|
||||
| general_01 | general | 403 | 157 | 197 | 197 | 158 |
|
||||
| general_02 | general | 396 | 149 | 190 | 190 | 150 |
|
||||
@@ -0,0 +1,32 @@
|
||||
# v2 实验目录(research/v2_experiments/)
|
||||
|
||||
端云协同 LLM 协作系统(《实现方案_v2》第 9 节)的论文数据来源。
|
||||
|
||||
## E1 token 经济学(主实验)— 已有本地确定性结果 ✅
|
||||
|
||||
- 脚本:`scripts/bench_tokens.py`
|
||||
- 数据集:`eval/v2_sample.json`(12 条,code/math/legal/medical/finance/life/education/general)
|
||||
- 输出:`E1_token_economics.csv`、`E1_token_economics.md`
|
||||
- 当前(本地 estimate_tokens 测量):**A2 交流文本相对 A1 全量逐字上下文降 ~61%**,
|
||||
稳定前缀可命中 ~99% 的 A2 输入。
|
||||
- 待办:`--live` 模式(API key + 本地 llama-server)确认 ≥80% 北极星。
|
||||
|
||||
## E2 端到端质量 — 待接入
|
||||
|
||||
- 三臂:快路径 only / 完整协作管线 / 纯 Architect。
|
||||
- 判分:machine_checkable 用断言;其余 LLM rubric + 10% 人工抽检。
|
||||
|
||||
## E3 协作健康度
|
||||
|
||||
- 升级率 / 回合数分布 / issue 率 / 自修成功率 / 熔断次数(可复用 /metrics 的 V2Stats)。
|
||||
|
||||
## E4 KV 量化内存-精度曲线
|
||||
|
||||
- fp16 / q8_0 / q4_0 × 上下文 4K/16K/32K:进程内存 × Worker 验证准确率。需真实 llama-server。
|
||||
|
||||
## E5 验证器 P/R
|
||||
|
||||
- 100 产物注入 50 处缺陷,测接地验证拦截率/误杀率;对照组=纯模型自由判断。
|
||||
- 验证器已实现(router_system/verifier.py),跑数待接入。
|
||||
|
||||
> 运行命令:`.venv/Scripts/python.exe scripts/bench_tokens.py`
|
||||
Reference in New Issue
Block a user