-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[XPO] xpo trainer #1943
[XPO] xpo trainer #1943
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
kl isn't logged in XPO. Is it possible to have it logged? |
from @kashif
trl/trl/trainer/online_dpo_trainer.py Line 389 in 72f19c3
Your calculation # Calculate KL divergence for model and ref data
kl_model_data = model_logprobs_model_data - ref_logprobs_model_data
kl_ref_data = model_logprobs_ref_data - ref_logprobs_ref_data
mean_kl = (kl_model_data.sum(1) + kl_ref_data.sum(1)).mean() / 2
self.stats["objective/kl"].append(gather_mean(mean_kl)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice work @kashif
Co-authored-by: Quentin Gallouédec <[email protected]>
https://huggingface.co/papers/2405.21046 implementation