-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CPO & SimPO add label_smoothing (#493)
## Summary <!--- This is a required section; please describe the main purpose of this proposed code change. ---> Add label_smoothing support for CPO and SimPO so that they align with the huggingface [interface](https://github.com/huggingface/trl/blob/b668048fe1931c57796ad5ae3f10852337ce7565/trl/trainer/cpo_trainer.py#L645C1-L658C14). <!--- ## Details This is an optional section; is there anything specific that reviewers should be aware of? ---> ## Testing Done - [x] Something wrong with the unit test. I'll have to fix it <!--- This is a required section; please describe how this change was tested. ---> <!-- Replace BLANK with your device type. For example, A100-80G-PCIe Complete the following tasks before sending your PR, and replace `[ ]` with `[x]` to indicate you have done them. --> - Hardware Type: <BLANK> - [x] run `make test` to ensure correctness - [x] run `make checkstyle` to ensure code style - [ ] run `make test-convergence` to ensure convergence --------- Signed-off-by: Mecoli1219 <[email protected]>
- Loading branch information
1 parent
3205342
commit 79e2b02
Showing
4 changed files
with
78 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters