minimind/trainer
Linxiushen f81a948b52 [feat] get_lr 增加可选 warmup_frac 参数(默认关闭,行为逐值不变)
这是 #862 的收窄重提。#862 同时改了 5 个训练脚本的 argparse,面太宽;
这一版只改 trainer_utils.py 里的 get_lr 本身,不动任何训练脚本、不加任何命令行参数。

get_lr(current_step, total_steps, lr) 在 current_step=0 时返回满 lr,没有 warmup。
需要 warmup 的使用者(例如从随机初始化跑较大 batch 的预训练)现在可以传第四个
参数;不传则走原来那一行表达式。

在 total_steps ∈ {100, 1000, 7339, 39634, 150000} 上取 588 个采样点,
warmup_frac=0 与原实现的最大差异是 0.000e+00。
2026-09-20 21:41:23 +08:00
..
rollout_engine.py [fix] keep agent rollout token-aligned #850 2026-09-10 11:44:05 +08:00
train_agent.py [update] trim redundant comments 2026-09-20 20:33:40 +08:00
train_distillation.py [fix] ddp exit hang 2026-06-01 17:50:39 +08:00
train_dpo.py [fix] ddp exit hang 2026-06-01 17:50:39 +08:00
train_full_sft.py [update] remove expert args 2026-09-04 22:16:38 +08:00
train_grpo.py [update] trim redundant comments 2026-09-20 20:33:40 +08:00
train_lora.py [fix] ddp exit hang 2026-06-01 17:50:39 +08:00
train_ppo.py [update] trim redundant comments 2026-09-20 20:33:40 +08:00
train_pretrain.py [update] remove expert args 2026-09-04 22:16:38 +08:00
train_tokenizer.py [fix] train_tokenizer 读预训练语料时产出 0 条文本,静默训出空词表 2026-09-20 10:33:51 +08:00
trainer_utils.py [feat] get_lr 增加可选 warmup_frac 参数(默认关闭,行为逐值不变) 2026-09-20 21:41:23 +08:00