unslothai / unsloth

Finetune Llama 3.2, Mistral, Phi, Qwen 2.5 & Gemma LLMs 2-5x faster with 80% less memory
https://unsloth.ai
Apache License 2.0
18.58k stars 1.3k forks source link

fix: compute_loss bug #1151

Closed vo1d-ai closed 1 month ago

vo1d-ai commented 1 month ago

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.

danielhanchen commented 1 month ago

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