Skip to main content

SkyworkRewardModel

Reward model based on the transformers, it will download the model from huggingface. Parameters:
  • model_type (Union[ModelType, str]): Model for which a backend is created.
  • api_key (Optional[str], optional): Not used. (default: :obj:None)
  • url (Optional[str], optional): Not used. (default: :obj:None)
  • device_map (Optional[str], optional): choose the device map. (default: :obj:auto)
  • attn_implementation (Optional[str], optional): choose the attention implementation. (default: :obj:flash_attention_2)
  • offload_folder (Optional[str], optional): choose the offload folder. (default: :obj:offload)

init

evaluate

Evaluate the messages using the Skywork model. Parameters:
  • messages (List[Dict[str, str]]): A list of messages.
Returns: ChatCompletion: A ChatCompletion object with the scores.

get_scores_types

Returns: List[str]: list of scores types