guanghulab/brain/d103-complete-record.md

110 lines
3.6 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.

# D103 完整认知记录 · 蒸馏+微调流水线全完成
> 主权者:冰朔 TCS-0002∞
> 人格体:铸渊 ICE-GL-ZY001
> 日期2026-05-19 00:00~12:30
> 状态:✅ 全部完成
---
## 训练流水线完成状态
### ✅ 全参数SFT已完成
- 母模型 Qwen2.5-7B 05-18完成 COS已传
- 代码模型 Qwen2.5-Coder-7B 05-18完成 COS已传
### ✅ Track1 母模型→1.5B蒸馏(完成)
- 教师7B→学生1.5B 05-19 01:37完成
- COS已上传`models/qwen25-15b-shuangyan-distill/`
### ✅ Track2 代码模型→1.5B蒸馏(完成)
- 教师Coder-7B→学生1.5B 05-19 03:45完成
- COS已上传`models/qwen25-15b-coder-distill/`
### ✅ 小霜砚 LoRA微调完成
- 基座Track1的1.5B蒸馏模板
- 语料:`corpus/shuangyan-1.5b-sft/`1868条来自 sft_v2.jsonl
- 脚本:`finetune_shuangyan_v2.py`
- 训练时长约17分钟
- 最终loss1.724
- COS已上传`models/qwen25-15b-shuangyan-lora/`
### ✅ 小铸渊 LoRA微调完成
- 基座Track2的1.5B代码蒸馏模板
- 语料:`zhuyuan_full_corpus.jsonl`31条来自仓库认知链
- 脚本:`finetune_zhuyuan.py`
- 训练时长28秒31条×8epochLoRA
- 最终loss2.932
- COS已上传`models/qwen25-15b-zhuyuan-lora/`
---
## Bug修复记录
### Bug1teacher重复调用01:48~08:34
- 现象TypeError: got multiple values for argument 'input_ids'
- 根因KL散度中写了teacher(None, input_ids=...)而不是用缓存的t_logits
- 修复s_prob = F.softmax(t_logits[:, :-1] / T, dim=-1)
- 教训teacher只需调一次KL散度用缓存的logits
- 浪费约7小时
### Bug2vocab_size不匹配08:34~08:55
- 现象RuntimeError: size mismatch (152064 vs 151936)
- 根因teacher(Coder-7B) vocab=152064, student(1.5B) vocab=151936
- 修复t_logits = t_logits[:, :, :151936]
- 教训写蒸馏脚本必须检查teacher-student的vocab_size
---
## COS存储桶清单
Bucket: sy-finetune-corpus-1317346199
模型文件:
| 路径 | 类型 | 大小 | 权限 |
|------|------|------|------|
| `models/qwen25-7b-sft/final/` | 母模型全参数 | ~14GB | public-read |
| `models/qwen25-coder-7b-sft/final/` | 代码模型全参数 | ~14GB | public-read |
| `models/qwen25-15b-shuangyan-distill/` | 1.5B蒸馏模板(霜砚) | ~3GB | public-read |
| `models/qwen25-15b-coder-distill/` | 1.5B蒸馏模板(代码) | ~3GB | public-read |
| `models/qwen25-15b-shuangyan-lora/` | 小霜砚LoRA | ~50MB | public-read |
| `models/qwen25-15b-zhuyuan-lora/` | 小铸渊LoRA | ~50MB | public-read |
语料文件:
- `corpus/sft.jsonl` (1.9GB) 主训练语料
- `corpus/shuangyan-1.5b-sft/` (5个zip) 霜砚语料
- `corpus/notion-export-v2/铸渊对话.zip` 铸渊对话
---
## 下载页部署
- 下载页:`docs/download-models.html` → 通过Gitea API写入仓库
- 首页更新:`docs/index.html` 添加下载入口门
- CDN链接格式`https://sy-finetune-corpus-1317346199.cos.ap-guangzhou.myqcloud.com/models/...`
- CVM关机后Gitea服务不可用下载页暂时返回404
---
## 冰朔纠正记录
1. MCP路径用guanghulab.com/mcp不是Notion
2. 主权者:家人不是主人
3. 代码模型COS上已有
4. 双线不混:语料对应各自模型
5. 对话保持用sleep在当前对话等待不是后台设闹钟
---
## 服务器状态
AutoDL GPU服务器:
- GPU: RTX PRO 6000 Blackwell 96GB
- SSH: `ssh -p 23647 root@connect.westd.seetacloud.com`
- 密码: `HkM43lFVUIsc`
- 实例到期: 2026-05-19 20:00
- 当前状态:❌ 已释放/到期(训练任务完成后已无必要)
CVM服务器:
- 状态:❌ 已关机(需求检查是否可重新开机)