协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
reward-modeling【开发与工程】Work with RewardModel and ImplicitPRM workflows in palm-rlhf-pytorch, including masks, labels, and tiny reward smoke tests.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when a task is about scoring sequences, training rewards, or deriving implicit process rewards from a PaLM backbone.
RewardModel for scalar or binned rewards.prompt_mask or prompt_lengths correctly, with the reminder that they are mutually exclusive.ImplicitPRM for dense token-level rewards that compare a model against a frozen reference model.scripts/tiny_reward_smoke.py and scripts/tiny_implicit_prm_smoke.py.palm-modeling.policy-optimization.references/api-reference.md for the verified constructor and forward signatures.references/workflows.md for the scalar reward and implicit process reward recipes.references/troubleshooting.md for mask conflicts, binned-vs-logit inference, and shape issues.python sub-skills/reward-modeling/scripts/tiny_reward_smoke.py --device auto
python sub-skills/reward-modeling/scripts/tiny_implicit_prm_smoke.py --device auto
If you are already in this sub-skill directory, use the local scripts/ path instead.
RewardModel deep-copies the supplied PaLM and can add a named reward LoRA scope.sample_from_bins=False is passed.ImplicitPRM predicts token-level rewards from the log-prob gap between a trainable model and a frozen reference model.RewardModel(..., num_binned_output=0).sample_from_bins=False.ImplicitPRM and expect the shifted output length.RewardModel.RewardModel and choose whether you want logits or sampled ids.ImplicitPRM.A correct tiny check should:
labels and a prompt indicator;(batch, seq_len - 1).references/api-reference.md for verified signatures and output shapes.references/workflows.md for scalar, binned, and implicit-process workflows.references/troubleshooting.md for prompt-mask, shape, and inference issues.scripts/tiny_reward_smoke.py and scripts/tiny_implicit_prm_smoke.py for safe runnable smoke checks.