zmzhang2000 / trustworthy-alignment

Official repository for Trustworthy Alignment of Retrieval-Augmented Large Language Models via Reinforcement Learning
5 stars 1 forks source link

reward functions #2

Closed schmidtj3 closed 19 minutes ago

schmidtj3 commented 5 hours ago

Can you point me to the part of the code base that implements the reward functions described in Equations 5, 6, 7, 8 in the paper?

I would like to understand how these equations are translated into code. Thank you!

zmzhang2000 commented 4 hours ago

Can you point me to the part of the code base that implements the reward functions described in Equations 5, 6, 7, 8 in the paper?

I would like to understand how these equations are translated into code. Thank you!

Eqn 5 and 7 are implemented in L240-L260 of ppo_trainer.py.

Eqn 6 and 8 are implemented in compute_rewards() of ppo_trainer.py.

schmidtj3 commented 19 minutes ago

Thank you very much !