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

Potential bug in accumulating KL #4

Closed
pradeep-pyro opened this issue Jan 9, 2025 · 2 comments
Closed

Potential bug in accumulating KL #4

pradeep-pyro opened this issue Jan 9, 2025 · 2 comments

Comments

@pradeep-pyro
Copy link

Thanks for the paper and releasing this code base!
I had a question on whether this line of code: https://github.com/liziniu/ReMax/blob/master/step3_rlhf_finetuning/remax_trainer.py#L250 should be cumulative_kl += rather than cumulative_kl =. Seems like the KL accumulation is not really happening.

@liziniu
Copy link
Owner

liziniu commented Jan 10, 2025

You are right! Line 250 calculates the one-step KL divergence rather than the cumulative KL. To calculate the cumulative KL, it shoul bd cumulative_kl +=

@pradeep-pyro
Copy link
Author

Thank you for the clarification.

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

2 participants