计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
rlaif_reward_modeling【效率与协作】Train and validate tiny soft-label pairwise reward models that distill RLAIF AI preference distributions with cross-entropy.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when a RLAIF workflow needs canonical reward-model distillation from pairwise AI soft labels. It is designed for small deterministic recovery checks as well as adapter code that mirrors the paper's reward-model objective.
Do not use this skill for direct-RLAIF single-response scoring or policy-gradient updates. It produces a reward model or score trace, not a trained language model policy.
context, response1, response2, and preference = [p1, p2].loss_before, loss_after, params_before, params_after, and optimizer_state_changed.Run:
python scripts/reward_modeling.py --smoke
python tests/test_reward_modeling.py
The tests assert that training decreases soft-label cross-entropy, changes parameters, and preserves soft labels without one-hot rounding.
This skill's bundled trainer is intentionally tiny. It proves the canonical RLAIF loss and data contract, but it does not reproduce PaLM 2 reward-model fine-tuning.