prompting.validators.reward.dahoas#

Module Contents#

Classes#

DahoasRewardModel

class prompting.validators.reward.dahoas.DahoasRewardModel(path, device)#

Bases: prompting.validators.reward.reward.BaseRewardModel

Parameters:
  • path (str) –

  • device (str) –

property name: str#
Return type:

str

model_name = 'EleutherAI/gpt-j-6b'#
static load_weights(path)#
Parameters:

path (str) –

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]

forward(input_ids=None, past_key_values=None, attention_mask=None, token_type_ids=None, position_ids=None, head_mask=None, inputs_embeds=None, mc_token_ids=None, labels=None, return_dict=False, output_attentions=False, output_hidden_states=False)#