Closed tahirahmad2030 closed 2 months ago
I don't know the fix, but I have worked around by doing:
model.floating_point_ops = lambda s: 0
More detail: I was passing data to DPO as plain Python objects, not tensors, since that's what DPO expects. But the floating_point_ops
method of some models expects tensors. Since this method was only used for monitoring, I just replaced it with a noop.
Thanks for the work around @b11z .
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Transformers:
4.41.2
trl:0.9.4
torch:Version: 2.3.0+cu121
I am training a simple translation model using DPO Trainer and the code is below:
The error:
I tried different envs like sagemaker and google colab but the error persists.