prompting.validators.reward.prompt#

Module Contents#

Classes#

PromptRewardModel

class prompting.validators.reward.prompt.PromptRewardModel(device)#

Bases: prompting.validators.reward.reward.BaseRewardModel

Parameters:

device (str) –

property name: str#
Return type:

str

reward_model_name: str = 'VMware/open-llama-7b-open-instruct'#
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]