prompting.validators.penalty.keyword_match
#
Module Contents#
Classes#
- class prompting.validators.penalty.keyword_match.KeywordMatchPenaltyModel#
Bases:
prompting.validators.penalty.penalty.BasePenaltyModel
- check_exploits_keywords(completion, name)#
- calculate_penalties(task, completions)#
- Parameters:
task (prompting.validators.tasks.Task) –
completions (List[str]) –
- Return type:
torch.FloatTensor