Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Drop long samples and shuffle rl samples #2040

Merged
merged 8 commits into from
Nov 19, 2024
Merged

Conversation

NanoCode012
Copy link
Collaborator

@NanoCode012 NanoCode012 commented Nov 12, 2024

Description

This PR aims to solve three issues:

  • TRL not dropping long samples: ˈɛmpti reported TRL does not drop long samples which could lead them to being truncated.
  • Caitlyn G. and ˈɛmpti also reported about shuffling issues with KTO. KTOTrainer does not perform shuffling prior-training anymore and uses sequentialsampler. https://github.com/huggingface/trl/pull/2248/files
  • Logging number of dropped samples for both SFT+RL. This was requested a while back from someone in discord.

Motivation and Context

How has this been tested?

Run preprocess and check dropped samples:

  • DPO
  • IPO
  • ORPO
  • KTO
  • Simpo

Screenshots (if appropriate)

Types of changes

Social Handles (Optional)

@NanoCode012 NanoCode012 marked this pull request as ready for review November 12, 2024 11:37
@winglian winglian merged commit f007c38 into main Nov 19, 2024
11 checks passed
@winglian winglian deleted the feat/drop_shuffle_rl branch November 19, 2024 15:18
djsaunde pushed a commit that referenced this pull request Dec 17, 2024
* feat: LOG warn if samples are dropped due to seq length

* feat: add drop long samples for RL

* feat: add ipo

* fix: remove num_proc for map as subprocesses are prone to die

* feat: shuffle rl dataset

* fix: support preprocess for kto

* chore: use set instead of list

* feat: add simpo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants