iomgaa
|
4f13365ffa
|
层1: 损失缩放终解——显式退出 HF 新式梯度累积契约(model_accepts_loss_kwargs=False)
第二幕根因:新式契约的 ×world_size 补偿在基类 compute_loss 尾部(v5
trainer.py:2028),整体重写会绕过它 → loss 与梯度 ÷4(sanity 0.244≈0.85/4)。
按 HF 文档建议(trainer.py:1977)退出新式契约回经典行为;docs/02 勘误改为
两幕全记录。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-18 10:25:11 -04:00 |
|
iomgaa
|
ee16e29846
|
层1: 修复 HF 梯度累积契约坑——compute_loss 按新式契约返回 sum/num_items_in_batch
根因(探针定案):预训练模型真实 CE≈0.85,训练日志 7.5≈0.94×8(累积步数)。
Qwen3 forward 接受 loss_kwargs → Trainer 走新式契约不再除以累积步数,我们
返回裸 mean 导致日志与梯度同放大 8 倍。sft_loss 纯函数不动,适配收口在
compute_loss;docs/02 §5 勘误起点预期(~0.85)并记录此坑。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-18 10:18:09 -04:00 |
|
iomgaa
|
a0faec0df7
|
层1: 修复远程 sanity OOM——per_device batch 8→2、累积 2→8(全局 64 不变)
根因:150k 大词表下显存大头是 (B,T,V) logits 链(fp32 ~20G@B=8)与逐层激活,
均正比于 B 而与 0.6B 参数量无关。docs/02 §2.6 旧显存估算勘误入档;
train_sft.sh 加 expandable_segments 防碎片。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-18 09:21:38 -04:00 |
|
iomgaa
|
68216ace22
|
docs: 第三章勘误——off-policy 切片是数据轨迹上的 KL 蒸馏而非混 SFT;补 prompt-only 下静默空转的说明
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-18 09:02:41 -04:00 |
|
iomgaa
|
1d272b6d6c
|
docs: roadmap 索引同步(第三章已写待读)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-18 08:34:45 -04:00 |
|
iomgaa
|
3c1530a1db
|
docs: 第三章——层 2 white-box OPD(式(2) 精读、standard 路径解剖、U1-U5 重构任务)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-18 08:34:29 -04:00 |
|
iomgaa
|
c5a3b7d0bb
|
层1/T5: 自包含训练脚本 train_sft.sh + train_sft.py;层 1 代码收口
- train_sft.py: FSDP 环境变量前置块(import 前,DDP 下无害);fail-fast 加载
顺序(数据→tokenizer→模型);首样本自检打印(真 tokenizer 掩码边界肉眼核对);
remove_unused_columns=False 等非显然约束逐条注释;sanity 模式 = replace 覆盖
- train_sft.sh: 显式 CUDA_VISIBLE_DEVICES 4 卡、PYTHONUNBUFFERED、HF 镜像/缓存
改道 /data,前置检查清单(含 scp 数据命令)
- 本地验证:fail-fast 到 teacher 缓存缺失处显式报错(941/1000,59 条真实命中
反向证明 prompt_key 契约端到端成立)
- roadmap 存档点:层 1 代码完成,进入运行阶段
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-18 08:16:24 -04:00 |
|
iomgaa
|
20e6d97427
|
层1/T2: teacher.py 批量生成 + sha256 JSONL 缓存;teacher 改定 MiniMax-M3
- teacher.py: 通用 OpenAI 兼容客户端(配置驱动 base_url,替代 OpenRouter 专用);
缓存即断点(逐条落盘+flush,重跑自动续传);单条失败先落盘其余、结束汇总显式报错;
M3 思考段 <think>...</think> 入库前剥离(只剥开头一段)
- configs.py: 新增 TeacherGenConfig(采样参数显式化;连接三元组走 .env)
- scripts/generate_teacher_completions.py: 自包含生成脚本(本地跑,与训练侧
同 seed 同子集约束已注明)
- teacher 决策变更同步:.env.example / docs/00 关键设定与存档点 / docs/02
- tests/test_teacher.py: 10 个单测(假客户端注入),含与 attach 的端到端契约闭环
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-18 07:52:53 -04:00 |
|
iomgaa
|
240f404416
|
工作模式变更入档:层 1 起 Claude 编写代码、用户精读提问;存档点同步
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-18 04:30:55 -04:00 |
|
iomgaa
|
6c128ad6f5
|
docs/02:FSDP 决策定案——DDP 到 1.7B,触发点写死(4B 或 seq>8K),env 坑今日消除(脚本头部前置块)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-18 04:21:30 -04:00 |
|
iomgaa
|
0bcfc6efd4
|
层 0 关账:两端环境验收通过(本地 4 passed + 远程 4 passed),存档点进入层 1
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-18 04:05:17 -04:00 |
|
iomgaa
|
12e2a8b0ae
|
docs: 第二章——层1 SFT 基线开工文档(参考实现解剖+保留/替代/删除清单+任务表);CLAUDE.md 映射表补 data.py
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-18 03:51:06 -04:00 |
|
iomgaa
|
77f0419bad
|
roadmap:训练数据定为 DAPO-Math-17K(对齐论文§5.1),登记 φ/β 两处论文-代码默认值背离
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-18 03:47:30 -04:00 |
|
iomgaa
|
9c0ec15716
|
setup_remote.sh 自清 pip 残留;存档点记录远程根分区结构性问题(/root/zym 507G)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-18 03:39:14 -04:00 |
|
iomgaa
|
f255d5613a
|
docs: roadmap 增加存档点小节(断点恢复用),登记层 0 当前状态
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-18 03:20:12 -04:00 |
|
iomgaa
|
cccccc0ce6
|
docs: 新增研究方向记录(RI-1:OmniOPD × ZO-RGD 零阶黎曼优化的三个结合点)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-18 02:57:01 -04:00 |
|
iomgaa
|
72799a34dc
|
tests: 预置 π̂ detach 命门守护测试(对应 docs/01 §3.4,层 3 接入真实 estimator)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-18 02:32:05 -04:00 |
|
iomgaa
|
c9eddd5be8
|
docs: 修正 π̂ detach 失败机制的方向性错误(压低先验逃逸而非抬高自我强化),补充推导要点
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-18 02:23:49 -04:00 |
|
iomgaa
|
d0bedd564c
|
docs: 教学注释规范与接口回看规则入 CLAUDE.md;新增 CLAUDE.md 取舍决策附录
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-17 11:59:05 -04:00 |
|
iomgaa
|
8647c5a89d
|
docs: 第一章——论文精读与参考实现全景映射(含实现与论文差异清单)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-17 11:29:20 -04:00 |
|
iomgaa
|
6dc13314d8
|
仓库骨架:README、CLAUDE.md、分层重构路线图(docs/00-roadmap.md)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-17 11:26:11 -04:00 |
|