You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have passed several iterations speaking about custom contrastive losses in torchtune. The last point in this direction was the deprecation of SimPO #2062 and the prohibition of new custom losses #2035 for the following reasons:
Usually new loss requires additional checks like if isinstance(loss, SimPO)
With highly active development of the field, new SOTA contrastive losses and methods are invented really often (workshops on A* about alignment).
But deletion without any solution is not a good way either. Custom losses right now require modifications of the recipe. After some discussion with @SalmanMohammadi, we propose the following:
Add a way to pass a custom loss for DPO in the recipe and custom forward without hard-coding args and outputs of the forward.
1.1 Probably just an argument in the recipe
Add a docs section with a brief explanation of how to do it and reference implementations for some SOTA losses (this section will not be updated with new losses releases as it is about design).
Will open PR
The text was updated successfully, but these errors were encountered:
We have passed several iterations speaking about custom contrastive losses in torchtune. The last point in this direction was the deprecation of SimPO #2062 and the prohibition of new custom losses #2035 for the following reasons:
if isinstance(loss, SimPO)
But deletion without any solution is not a good way either. Custom losses right now require modifications of the recipe. After some discussion with @SalmanMohammadi, we propose the following:
1.1 Probably just an argument in the recipe
Will open PR
The text was updated successfully, but these errors were encountered: