You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here, `ChosenRejectedOutputs` is a dataclass obtained from `concatenated_forward``:
70
+
71
+
.. code-block:: python
72
+
73
+
@dataclass
74
+
classChosenRejectedOutputs:
75
+
chosen_logps: torch.Tensor
76
+
rejected_logps: torch.Tensor
77
+
chosen_logits: torch.Tensor
78
+
rejected_logits: torch.Tensor
79
+
80
+
If this is not sufficient and you need to compute additional values from the logits, you can modify `concatenated_forward` directly. To do this, use `tune cp` to copy the desired recipe, and don’t forget to use your own dataclass!
81
+
82
+
Refer to the TRL library for reference implementations of the desired losses. In particular, you may find useful loss calculations in trainers.
83
+
62
84
For a deeper understanding of the different levers you can pull when using this recipe,
63
85
see our documentation for the different PEFT training paradigms we support:
0 commit comments