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

PPO for conversation datasets #1102

Closed
Reason-Wang opened this issue Dec 17, 2023 · 3 comments
Closed

PPO for conversation datasets #1102

Reason-Wang opened this issue Dec 17, 2023 · 3 comments

Comments

@Reason-Wang
Copy link

It seems that all the examples used alpaca-like datasets, where the actor model are given an instruction and generate a response. However, I want to know if there is a way to do PPO in ShareGPT-like conversational datasets, where the actor is updated based on assistant's response (assume we know the reward of each assistant's response). Should I do some masking to mask all user's content.

@younesbelkada
Copy link
Contributor

I am not sure custom masks are supported for PPO, only full padding right / left are support if I am not mistaken, meaning this would be currently not possible to do with PPOTrainer cc @lvwerra

@lvwerra
Copy link
Member

lvwerra commented Dec 21, 2023

Yes masking is supported since the addition of #424. Note that it is even necessary as training on tokens that don't come from the model distribution can have severe side effects!

Copy link

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants