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

Hindsight PRIOR #12

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Hindsight PRIOR #12

wants to merge 5 commits into from

Conversation

OrangeX4
Copy link
Collaborator

@OrangeX4 OrangeX4 commented Jul 3, 2024

Hindsight PRIORs for Reward Learning from Human Preferences

和原版不同,这里使用了 GPT2 架构,并且没有 observation model,而是直接使用一个回归预测头,自回归地预测 next_obs。

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Shengjun, would you please separate the changes of GPT2 and keep the implementation of GPT the same as before? I'm worried about the backward compatibility about this change since there are lots of algorithms depending on GPT2. You can unfold the code of GPT2 in TWM and add the interface you want (need_weights). Thanks!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the changes with compatibility, and it will not affect the existing algorithms. GPTBlock is only used in GPT2. And GPT2's output is the same as the original output when output_attentions defaults to False

reward_reg: 0.0
max_seq_len: 100
world_steps: 10000
prior_coef: 1000
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems too huge, could you record the scale of rm_loss and prior_loss and see whether this term actually dominates the reward learning? By the way, what's the default value of prior_coef in authors' impl.?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Origin paper: 1000 (MetaWorld), 5 (DMC)

Record:

prior_coef rm_loss prior_loss
1 0.3 0.015
100 0.5 1e-4
1000 0.7 5e-6

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

Successfully merging this pull request may close these issues.

2 participants