aleximmer / Laplace

Laplace approximations for Deep Learning.
https://aleximmer.github.io/Laplace
MIT License
432 stars 61 forks source link

Refactor reward-modeling likelihood #200

Closed runame closed 1 week ago

runame commented 2 weeks ago

Suggested refactor of the reward-modeling likelihood, let me know if I missed something. Advantages:

  1. Simplicity and readability. We get rid of self.reward_modeling and self._fitting (actually self._fitting was not even used before, not sure if you had a future use case in mind?).
  2. When a user calls la.likelihood it will always return "reward_modeling" which should be the expected behavior.

(Unrelated: I also removed a superfluous loss_with_var argument.)