Skip to content

Commit

Permalink
Remove unnecessary change from conflict merge
Browse files Browse the repository at this point in the history
  • Loading branch information
hebiao064 committed Dec 23, 2024
1 parent 06b2350 commit 3cf3771
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
5 changes: 0 additions & 5 deletions src/liger_kernel/chunked_loss/cpo_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ def preference_loss_fn(chosen_logps, rejected_logps, full_target, beta=0.1, labe
label_smoothing (float): Label smoothing factor, will reduce to Equation above when label_smoothing -> 0.
"""
logits = beta * (chosen_logps - rejected_logps)

loss = (-F.logsigmoid(logits) * (1 - label_smoothing) - F.logsigmoid(-logits) * label_smoothing).sum() / (
full_target.shape[0] // 2
)

loss = (-F.logsigmoid(logits) * (1 - label_smoothing) - F.logsigmoid(-logits) * label_smoothing).sum() / (
full_target.shape[0] // 2
)
Expand Down
1 change: 0 additions & 1 deletion src/liger_kernel/chunked_loss/simpo_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ def preference_loss_fn(
label_smoothing (float): Label smoothing factor, will reduce to Equation above when label_smoothing -> 0.
"""
logits = beta * (chosen_logps - rejected_logps) - gamma

loss = (-F.logsigmoid(logits) * (1 - label_smoothing) - F.logsigmoid(-logits) * label_smoothing).sum() / (
full_target.shape[0] // 2
)
Expand Down

0 comments on commit 3cf3771

Please sign in to comment.