class_docstr: Implements
  "Direct Preference Optimization:
  Your Language Model is Secretly a Reward Model"
  from https://arxiv.org/abs/2305.18290
class_docstr_tok: ["Implements","''","Direct","Preference","Optimization",":","Your","Language","Model","is","Secretly","a","Reward","Model","''","from","https",":","\/\/arxiv.org\/abs\/2305.18290"]
code: def __init__(self, cfg: Any):
      super().__init__()
      self.cfg = cfg
  
file_path: h2o-llmstudio/llm_studio/src/losses/text_dpo_modeling_losses.py
imports: import logging
  from typing import Any, KeysView, Tuple
  import torch
  import torch.nn.functional
  from torch import nn
label_desc: Use image node_id 1 to create a new DPOLoss object from inherited base classes: nn with example: obj = DPOLoss(cfg)