prompting.validators.penalty.content_match
#
Module Contents#
Classes#
Helper class that provides a standard way to create an ABC using |
- class prompting.validators.penalty.content_match.ContentMatchPenaltyModel(max_penalty)#
Bases:
prompting.validators.penalty.penalty.BasePenaltyModel
Helper class that provides a standard way to create an ABC using inheritance.
- Parameters:
max_penalty (float) –
- calculate_penalties(task, completions)#
- Parameters:
task (prompting.validators.tasks.Task) –
completions (List[str]) –
- Return type:
torch.FloatTensor