Skip to content

Commit

Permalink
pretty
Browse files Browse the repository at this point in the history
  • Loading branch information
lmeribal committed Nov 28, 2024
1 parent 8c61d13 commit 7a6b401
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion turbo_alignment/settings/pipelines/train/lddpo.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class LDDPOTrainerSettings(DPOTrainerSettings):
lc_alpha: float = 1.0
lc_alpha: float


class LDDPOTrainExperimentSettings(DPOTrainExperimentSettings):
Expand Down
1 change: 1 addition & 0 deletions turbo_alignment/trainers/lddpo.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def concatenated_forward(

public_ = chosen_mask * rejected_mask
public_mask = torch.cat([public_, public_])

public_logps = all_logps * public_mask

all_logps = self.lc_alpha * all_logps + (1 - self.lc_alpha) * public_logps
Expand Down

0 comments on commit 7a6b401

Please sign in to comment.