class_docstr: Reward model base class.
  
  Args:
      model (nn.Module): Reward model.
      value_head (nn.Module): Value head to get reward score.
      lora_rank (int): LoRA rank.
      lora_train_bias (str): LoRA bias training mode.
code: def __init__(
      self,
      model: nn.Module,
      value_head: Optional[nn.Module] = None,
      lora_rank: int = 0,
      lora_train_bias: str = "none",
  ) -> None:
      super().__init__(
          lora_rank=lora_rank, lora_train_bias=lora_train_bias
      )
      self.model = model
      self.convert_to_lora()
  
      if value_head is not None:
          if value_head.out_features != 1:
              raise ValueError(
                  "The value head of reward model's output dim should be 1!"
              )
          self.value_head = value_head
      else:
          self.value_head = nn.Linear(model.config.n_embd, 1)
  
file_path: ColossalAI/applications/Chat/coati/models/base/reward_model.py
imports: from typing import Optional
  import torch
  import torch.nn
  from ..lora import LoRAModule
label_desc: Use image node_id 1 to create a new RewardModel object from inherited base classes: LoRAModule with example: obj = RewardModel(model, value_head, lora_rank, lora_train_bias)