prompting.validators.reward.reciprocate#

Module Contents#

Classes#

ReciprocateRewardModel

class prompting.validators.reward.reciprocate.ReciprocateRewardModel(device)#

Bases: prompting.validators.reward.reward.BaseRewardModel

Parameters:

device (str) –

property name: str#
Return type:

str

reward_model_path: str = 'reciprocate/gpt-j_rm_format-oa'#
revision: str = '501f895'#
reward(prompt, completion, name)#
Parameters:
  • prompt (str) –

  • completion (str) –

  • name (str) –

Return type:

prompting.validators.reward.reward.BaseRewardEvent

get_rewards(prompt, completions, name)#
Parameters:
  • prompt (str) –

  • completions (List[str]) –

  • name (str) –

Return type:

List[prompting.validators.reward.reward.BaseRewardEvent]