Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Liu <[email protected]>
  • Loading branch information
austin362667 committed Nov 22, 2024
1 parent c8db7e2 commit 4ddce2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/liger_kernel/chunked_loss/dpo_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def backward(ctx, grad_output):
# Return these gradients, followed by None for the remaining inputs
return d_input, d_weight, d_target, None, None, d_bias, None, None, None


class LigerFusedLinearDPOLoss(torch.nn.Module):
"""
Fused linear layer with DPO loss.
Expand Down Expand Up @@ -132,4 +133,4 @@ def forward(self, lin_weight, _input, target, bias=None):
self.beta,
self.compute_nll_loss,
self.compiled,
)
)

0 comments on commit 4ddce2b

Please sign in to comment.