fix: compute_loss bug (#1151)
Currently, Unsloth doesn't pass additional parameters to Trainer.compute_loss such as return_outputs. This leads to errors when calling trainer.evaluate(). This change fixes the bug by properly passing parameters to Trainer.compute_loss.
This commit is contained in:
parent
94087e83d9
commit
5dcc0cd613
1 changed files with 1 additions and 1 deletions
|
|
@ -1166,7 +1166,7 @@ def _unsloth_pre_compute_loss(self, model, inputs, *args, **kwargs):
|
|||
inputs["num_items_in_batch"] = kwargs["num_items_in_batch"]
|
||||
pass
|
||||
pass
|
||||
return self._old_compute_loss(model, inputs, args, kwargs)
|
||||
return self._old_compute_loss(model, inputs, *args, **kwargs)
|
||||
pass
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue