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

RLHF for classification tasks #291

Open
vinodrajendran001 opened this issue May 13, 2024 · 2 comments
Open

RLHF for classification tasks #291

vinodrajendran001 opened this issue May 13, 2024 · 2 comments

Comments

@vinodrajendran001
Copy link

I am trying to apply RLHF on a text classification task. You can imagine the text classification model i.e. policy model here is emotion classification. The pretrained model can output class numbers ranging between 1 and 10. The reward model should train with the dataset labelled with correct class numbers (assuming it is available). Finally, I want to optimize the policy model with reward model using PPO.

Can this be done with this library? If so, please help by illustrating the steps.

Thanks

@hijkzzz
Copy link
Collaborator

hijkzzz commented May 13, 2024

This should require quite a lot of modifications.
I suggest you read the train_ppo.py code carefully.

@openllmai0
Copy link
Contributor

Here are two suggestions: 1. Text classification may not require complex RL algorithms. 2. If using RLHF, consider changing the output to label text instead of label number.

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