AstrAI/tests/trainer
ViperEkura 9bcd696580 fix: token-level ratio and prompt masking in GRPO strategy
- Mask prompt tokens to 0 so their logprobs excluded from ratio/KL
- Switch to token-level ratio + PPO clipping via reduction='none'
- Slice response token logprobs from full sequence output
- Replace k3 KL estimator with non-negative k1 estimator
- Fix epsilon from finifo.eps (~1e-38) to 1e-8
- Remove unused 'reduction' param from GRPOStrategy.__init__
- Clarify offline batch semantics in docstring
- Add 11 unit tests for masking, advantage, KL, sync, clipping
- Sync training.md and architecture.md docs
2026-07-12 21:24:09 +08:00
..
conftest.py refactor : replace iteration with consumed_samples 2026-06-30 18:42:42 +08:00
test_callbacks.py refactor : 清理工厂和配置系统中的死代码与冗余抽象 2026-06-07 11:39:50 +08:00
test_early_stopping.py refactor : replace iteration with consumed_samples 2026-06-30 18:42:42 +08:00
test_grpo_strategy.py fix: token-level ratio and prompt masking in GRPO strategy 2026-07-12 21:24:09 +08:00
test_train_strategy.py refactor : 清理工厂和配置系统中的死代码与冗余抽象 2026-06-07 11:39:50 +08:00
test_trainer.py refactor: 检查点加载重构,路径替代对象传递 2026-05-27 20:15:29 +08:00