TRL documentation
Callbacks
You are viewing v0.10.1 version.
A newer version
v0.24.0 is available.
Callbacks
SyncRefModelCallback
RichProgressCallback
A TrainerCallback that displays the progress of training or evaluation using Rich.
WinRateCallback
class trl.WinRateCallback
< source >( prompts: List judge: BaseRankJudge trainer: Trainer generation_config: Optional = None batch_size: int = 4 )
Parameters
- prompts (
List[str]) — The prompts to generate completions for. - judge (
BaseRankJudge) — The judge to use for comparing completions. - trainer (
Trainer) — The trainer. - generation_config (
GenerationConfig, optional) — The generation config to use for generating completions. - batch_size (
int, optional) — The batch size to use for generating completions. Defaults to 4.
A TrainerCallback that computes the win rate of a model based on a reference.