cerebras.modelzoo.losses.DPOLoss.DPOLoss#
- class cerebras.modelzoo.losses.DPOLoss.DPOLoss[source]#
Bases:
torch.nn.Module
DPO Loss :param beta: Temperature parameter for the DPO loss, typically something in the range of 0.1 to 0.5.
We ignore the reference model as beta -> 0.
- Parameters
reference_free – If True, we ignore the _provided_ reference model and implicitly use a reference model that assigns equal probability to all responses.
Methods
forward
- __call__(*args: Any, **kwargs: Any) Any #
Call self as a function.
- static __new__(cls, *args: Any, **kwargs: Any) Any #