Skip to content

fix: compute_loss bug#1151

Merged
danielhanchen merged 1 commit into
unslothai:mainfrom
vo1d-ai:patch-1
Oct 19, 2024
Merged

fix: compute_loss bug#1151
danielhanchen merged 1 commit into
unslothai:mainfrom
vo1d-ai:patch-1

Conversation

@vo1d-ai

@vo1d-ai vo1d-ai commented Oct 19, 2024

Copy link
Copy Markdown
Contributor

Currently, Unsloth doesn't properly pass additional parameters to Trainer.compute_loss such as return_outputs because of a typo. This leads to errors when calling trainer.evaluate(). This change fixes the bug.

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.
@danielhanchen

Copy link
Copy Markdown
Member

Oh dumb me forgot to unwrap the args and kwargs!!

@danielhanchen danielhanchen merged commit 12bdd86 into unslothai:main Oct 19, 2024
@vo1d-ai vo1d-ai deleted the patch-1 branch October 26, 2024 10:31
abiswas-realadvice pushed a commit to abiswas-realadvice/unsloth that referenced this pull request May 14, 2026
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.
ayoubzulfiqar pushed a commit to ayoubzulfiqar/unsloth that referenced this pull request Jun 11, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants