Add model iteration skill

This commit is contained in:
武阳
2026-05-09 12:18:06 +08:00
parent 95c265d2a1
commit 6a58eb55fe
9 changed files with 2064 additions and 0 deletions
+66
View File
@@ -0,0 +1,66 @@
# Skill: model-iteration
本目录是小爱中控模型迭代 skill,用于评测、错误分析、数据增强、SFT 训练和 CML workflow 追踪。
## 目录结构
```
model-iteration/
├── config.yaml # 评估阈值 + CML 工作流配置
├── knowledge/ # 分流知识库
│ ├── navigation_routing_rules.md # 地图导航 Agent/ComplexTask 分流
│ ├── travel_routing_rules.md # 旅游 Agent/ComplexTask 分流
│ └── multi_command_rules.md # 多指令 vs ComplexTask 判定
├── scripts/
│ ├── prepare_and_train_sft.py # 数据组装 + 本地训练
│ ├── submit_sft_via_cml.sh # CML 云端训练提交(R29 起统一用此)
│ └── sft_train_job.yaml.tpl # CML 训练 job YAML 模板
├── SKILL.md # 完整迭代协议(触发规则、Step 0-6、数据增强/清洗规范)
└── README.md # 本文件
```
## 快速上手
### 1. 评测当前模型
```bash
cml workflow run \
--workflow_id f-20260408161444-wu3pz --version v28 \
--global_inputs runDic=<N> \
--global_inputs model_path_new=<新模型路径> \
--global_inputs model_path_old=<基线模型路径>
```
### 2. SFT 训练(CML 云端)
```bash
AUTORESEARCH_ROOT=/mnt/wangsenhao/autoresearch-zk \
./scripts/submit_sft_via_cml.sh <RUNDIC> [PREV_RUNDIC]
```
训练完成后自动起评测 workflow。
### 3. SFT 训练(本地)
```bash
AUTORESEARCH_ROOT=/mnt/wangsenhao/autoresearch-zk \
python scripts/prepare_and_train_sft.py prepare --output_dir ./sft_data
AUTORESEARCH_ROOT=/mnt/wangsenhao/autoresearch-zk \
python scripts/prepare_and_train_sft.py train \
--data_dir ./sft_data \
--model_path /mnt/wangsenhao/verl_zk/Qwen3-4B-Instruct-2507 \
--model_type qwen3 \
--train_output ./sft_output \
--epochs 3 --lr 1e-5
```
## 关键规则
- **达标标准**:需求集合 ≥ 95%,大盘车载降幅 ≤ 0.3%specific test 降幅 ≤ 1%
- **数据清洗**:case 驱动、禁止批量、必须备份、只改 output 不动 instruction
- **训练环境**FSDP2 + torch 2.6 需要 accelerate==1.7.0,不要改训练代码去适配
## 完整协议
详见 [SKILL.md](SKILL.md)